Message Boards Message Boards


Plotting using ArcLength function? [solved]

Posted 3 months ago
2 Replies
0 Total Likes

For a dynamics class, we designed a roller coaster, and one of the requirements is to plot the velocity vs distance traveled, which I can do, but one section of my coaster will not plot.

The part with the helix of decreasing radius gives errors in the code. Upon starting the project, I did not know about the ArcLength function, and was calculating arc length using


and that returned the length for everything except the helix. For the helix, it returned the unevaluated integral.

ArcLength[h[t], {t,0,4pi}] works fine, but the error seems to come in when I do length[r_] = ArcLength[h[t], {t,0,r}]

What can I change so I can successfully plot the distance versus speed?

2 Replies


Your issue is twofold. Your len functions should be defined as follows:

len3[r_] := ArcLength[h[tt], {tt, 0, r}];

You need the := (SetDelayed) so the ArcLength function does not try to evaluate its argument before r is defined. If you want you can do this only for the expressions that do not readily provide an analytic solution to ArcLength and let the other functions evaluate immediately.

The next problem is that your variable "t" in the ArcLength is interfering with the variable "t" in the parametricPlots. Change the name in one place (as above). Now your code will run.



Thank you!!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract