Message Boards Message Boards

0
|
2179 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Trouble with derivative of piecewise parametric equation

Posted 11 years ago
So I'm trying to take a derivative of a parametric equation for a calculus 3 project. At frist glance I thought the code was working fine, but at closer examiniation, it is not.
Here's the input:
 r[t_] = Piecewise[{{{5 t, 0, 3 (1 + Cos[ t])},
      0 <= t <= \[Pi]}, {{5 Cos[t - 3 \[Pi]/2] + 5*\[Pi],
       5 Sin[t - 3 \[Pi]/2] + 5, 0}, \[Pi] < t <=
       2 \[Pi]}, {{5*\[Pi] + 3*Cos[t - 3 \[Pi]/2],
       2*5 - 3 + 3*Sin[t - 3 \[Pi]/2], 1/(2 \[Pi]) (t - 2 \[Pi])^2},
      2 \[Pi] < t <= 4 \[Pi]}, {{-3 (t - 17 \[Pi]/3),
       10, -1/\[Pi] t^2 + 10 t - 22 \[Pi]},
      4 \[Pi] < t <= 5 \[Pi]}, {{-3 t + 17 \[Pi],
       10, -972 \[Pi] + 540 t - (99 t^2)/\[Pi] + (6 t^3)/\[Pi]^2},
     5 \[Pi] < t <= 6 \[Pi]}, {{-\[Pi] - 3 Sin[t],
      9/40 (1/3 (20 + 18 \[Pi]) - t)^2, 3 Cos[t] - 3},
     6 \[Pi] < t <=
      8 \[Pi]}, {{-25 \[Pi] + 25 t - (19 t^2)/(4 \[Pi]) + t^3/(
       4 \[Pi]^2), -(25/2) (140 - 132 \[Pi] + 27 \[Pi]^2) + (
       15 (80 - 74 \[Pi] + 15 \[Pi]^2) t)/(2 \[Pi]) - (
       3 (180 - 164 \[Pi] + 33 \[Pi]^2) t^2)/(
       8 \[Pi]^2) - ((-50 + 45 \[Pi] - 9 \[Pi]^2) t^3)/(20 \[Pi]^3),
      1056 - (360 t)/\[Pi] + (81 t^2)/(2 \[Pi]^2) - (3 t^3)/(
       2 \[Pi]^3)}, 8 \[Pi] < t <= 10 \[Pi]}}];
D[r[t], t]
and the first three lines of the output:
{5, 0, -3 Sin}
{-5 Cos, -5 Sin, 0}
{-3 Cos, -3 Sin, (-2 \ + t)/\}

I'd post the actual code, but it doesn't format very nicely if I copy and past it here. These should be adequete examples though.
As you can see, it got the first derivative of the first piece right, but the derivatives of the other pieces are not correct...

What's the appropriate code to find the derivative of a piecewise parametric function?

Thanks a bunch.
Let's take for example the interval Pi < t <= 2 Pi, then the derivative is
In[3]:= D[{5 Cos[t - 3 Pi/2] + 5 Pi, 5 Sin[t - 3 Pi/2] + 5, 0}, t]

Out[3]= {-5 Cos[t], -5 Sin[t], 0}
Is there a reason to believe this is not correct?
POSTED BY: Ilian Gachevski
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