Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Empirically solving complex problems

by jhourcle (Prior)
on Mar 06, 2005 at 14:28 UTC ( [id://437043]=note: print w/replies, xml ) Need Help??


in reply to Empirically solving complex problems

As a Civil Engineering major, this was the way in which we solved for the area under any curve, if we didn't have a way to take the integral. I think the class was called 'Numerical Analysis' or 'Numerical Methods' or something like that. And of course, we used Fortran for all of it.

Anyway, from $min to $max, given function F() and $number_of_steps, assuming it never goes negative, the integral (area, assuming it stays positive) will always be:

$step_size = ($max - $min) / $number_of_steps; my $total = ( F($min) + F($max) ) / 2; foreach ( 1 .. $number_of_steps-1 ) { $total += F( $min + ($step_size * $_) ); } my $area = $total * $step_size;

You would then repeat the process, each time increasing $number_of_steps until $area varies by less than whatever your required precision is.

The only problem with fitting this to your problem is to come up with the correct F() that describes the curve that you're trying to solve for. (Of course, solving for the overlapping area of two normal curves was handled in LRFD (Least Resistance Failure Design, where you assume that the final strength of a structure is represented by a normal distribution, and the final loading is also a normal distribution, and you attempt to get the chance of failure to a particular chance... we used a series of tables for all of that, though))

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://437043]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found