How to calculate curvature of a vector in Mathematica.

In summary, the conversation discusses the calculation of the curvature of a given function, r(t), for a specific interval, 0≤t≤4pi. The formula used for the calculation is k = | r' x r'' | / | r' |^3, and the resulting graph appears to be a large wave. The length of the curvature is also mentioned and is calculated using the formula Sum[Limit[b, t -> \[Omega]], {\[Omega], 0, 4 Pi}]. However, there seems to be a discrepancy between the expected and actual results, which is attributed to incorrect syntax and initial settings in the function r. After correcting these errors, the correct result of 26.89
  • #1
november1992
120
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
  • #2
t or t_ in the Plot function?
 
  • #4
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
 
  • #5
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:
  • #6
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 :)
 
  • #7
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:
  • #8
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 ?
 
  • #9
Last edited:
  • #10
Well, I am probably using wrong/incorrect formula.
Sticking to your notebook we get 26.8967 as an answer.
Can you verify that ?
 
  • #11
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:
  • #12
Well, using the simple
Code:
Sum[k[t],{t,0,4Pi}]
I, again, receive 26.8967.
 
  • #14
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.
 
  • #15
I can't believe I overlooked that. I also removed the parentheses. Now I'm getting 26.89. Thanks for the help
 
  • #16
You are welcome :)
 

1. What is the formula for calculating curvature of a vector in Mathematica?

The formula for calculating curvature of a vector in Mathematica is Curvature[vector], where "vector" is the name of the vector you want to calculate the curvature for.

2. Can Mathematica calculate the curvature of a vector in three dimensions?

Yes, Mathematica can calculate the curvature of a vector in three dimensions. The formula is the same as in two dimensions, Curvature[vector], but the vector must have three components.

3. Can the curvature of a vector be negative in Mathematica?

Yes, the curvature of a vector can be negative in Mathematica. This indicates that the vector is curving in the opposite direction of the chosen coordinate system.

4. How is the curvature of a vector affected by its length in Mathematica?

The curvature of a vector is not affected by its length in Mathematica. It is solely determined by the direction and magnitude of the vector itself.

5. Can Mathematica calculate the curvature of a vector at a specific point?

Yes, Mathematica can calculate the curvature of a vector at a specific point. This can be done by using the formula Curvature[vector, point], where "vector" is the name of the vector and "point" is the coordinates of the specific point.

Similar threads

  • Electromagnetism
Replies
1
Views
765
Replies
3
Views
1K
  • Differential Equations
Replies
1
Views
770
  • Calculus and Beyond Homework Help
Replies
22
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Special and General Relativity
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
Back
Top