Message Boards Message Boards

0
|
3427 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Plotting using ArcLength function? [solved]

Posted 5 years ago

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

Integrate[D[parametric[t],t].D[parametric[t],t],{t,a,b}]

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?

Attachments:
POSTED BY: Addison Conzet
2 Replies

Addison,

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.

Regards,

Neil

POSTED BY: Neil Singer

Thank you!!

POSTED BY: Addison Conzet
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract