Approximation for Numerical Problems (cont)
Example: Length of a Curve
Estimate length: approximate curve as sequence of straight lines.
length=0, δ=(end-start)/StepSize
for each x∈[start+δ,start+2δ,..,end] do
length = length + sqrt(δ2 + (f(x)-f(x-δ))2)
end for
|
|