How to calculate curvature of a vector in Mathematica.

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
15 replies · 5K views
november1992
Messages
120
Reaction score
0

Homework Statement


r(t)={(4+cos20t) cost,+(4+cos20t) sint,+0.4sin20t}
Calculate the curvature of r[t] for 0≤t≤4pi

Homework Equations



k = | r' x r'' | / | r' |^3

The Attempt at a Solution



r[t_]:={4+Cos[20t]*Cos[t],4+Cos[20t]*Sin[t],0.4Sin[20t]}
k[t_]:=Norm[Cross[r',r'']]/Norm[r']^3
Plot[k[t],{t,0,4Pi}]
I don't get any error messages, but the graph is blank.

http://i.imgur.com/woWlabm.png
http://i.imgur.com/ptUZcVG.png
 
Last edited:
Physics news on Phys.org
If you have defined a function using the "standard" form, id est, f[x_] := you do not want the x_ on the right hand side of the definition.
Now to your real problem:
You forgot to specify that the derivatives are also functions of t :)
Code:
r[t_] := {4 + Cos[20 t]*Cos[t], 4 + Cos[20 t]*Sin[t], 0.4 Sin[20 t]}
k[t_] := Norm[Cross[r'[t], r''[t]]]/Norm[r'[t]]^3
Plot[k[t], {t, 0, Pi/4}]
SHBjJ14.png
 
Haha, I actually managed to plot it, but I thought it was wrong because I wasn't expecting a huge wave.

I was also told to calculate the length of the curvature. Do you think this would be an acceptable answer?

http://i.imgur.com/HHYzFy7.png

Is there a way to simplify this expression?
 
Last edited:
If I am not mistaken
[tex] \kappa = \left | \frac{f''(x)}{(1 + f'(x)^{2})^{\frac{3}{2}}} \right |[/tex]

is the formula one would use to calculate the curvature.
Following this we would end up right here:
JTq0NQi.gif


Well, in theory you can apply //Simplify, but Mathematica has done this already, so in my opinion - no :)
 
Okay, thanks. I have one last question. How can I use the inte\frac{}{}rval <0,4pi> in this equation?
I'm just a little confused about why this formula, k = |[itex]\frac{r(t)' X r(t)''}{r(t)'^3}[/itex]| gives a different answer to the formula you posted
 
Last edited:
Something like this should do the trick:

Code:
Sum[Limit[b, t -> \[Omega]], {\[Omega], 0, 4 Pi}]

where 'b' is

JTq0NQi.gif
Where did you get this formula ?
 
Well, I am probably using wrong/incorrect formula.
Sticking to your notebook we get 26.8967 as an answer.
Can you verify that ?
 
I'm not getting a number.
http://i.imgur.com/mQ4Pfac.png

I'm guessing I have incorrect syntax.

Edit:

I realized i didn't capitalize the 'p' in Pi. [STRIKE]now I"m getting 13k though[/STRIKE] I got 20.39
 
Last edited:
Well, using the simple
Code:
Sum[k[t],{t,0,4Pi}]
I, again, receive 26.8967.
 
You should check the initial settings in r, because I see errors there.
For example a missing 't' in the first part :)
Check again the problem and repost what is actually given.
 
I can't believe I overlooked that. I also removed the parentheses. Now I'm getting 26.89. Thanks for the help