1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Programming C++ Project

  1. Feb 26, 2005 #1
    I have a few probelms...the approximate length isnt working right when i compare my sol'n w/ the samplecalc. Im attaching my updated code along w/ this message
    I have to write a program that compute the arc length : "A segment of the curve can b divided into intervals and a chord to the curve draqn in each interval. The approximate length of the segment is obtained by adding up the lenghts of the chords. The accuracy of the result is a function of the number of intervals used. Increasing the number of the chords increases the accuracy, but only up to a point. The computation is to be terminated when the use of a larger number of intervals produces a negligible change in the result."
    and there is one part I that i have to do...but not sure how:
    Call function approx to compute aplen, the approximate value of the length. Use n=4 intervals for the first approximation. Repeat the computaion up to 10 times, doubling the value of n each time, as long as successive length values are increasing, and differences between successive values are decreasing and are greater than .01 percent(%) of the approximate value.

    Attached Files:

    • C++.txt
      File size:
      4.1 KB
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted