How to calculate curvature of a vector in Mathematica.

Click For Summary

Discussion Overview

The discussion revolves around calculating the curvature of a vector function defined in Mathematica. Participants explore the application of curvature formulas, syntax issues in Mathematica, and the interpretation of results over a specified interval.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant presents a vector function and attempts to calculate its curvature using the formula k = | r' x r'' | / | r' |^3, but encounters a blank graph.
  • Another participant questions the use of 't' versus 't_' in the Plot function, suggesting it may affect the output.
  • A participant points out that the derivatives need to be defined as functions of 't' in Mathematica, providing a corrected version of the function definitions.
  • One participant expresses surprise at the appearance of the plotted curvature, describing it as a "huge wave" and inquires about simplifying the expression for curvature length.
  • Another participant introduces an alternative curvature formula involving second derivatives and discusses the potential for simplification in Mathematica.
  • There is confusion regarding the application of the interval <0, 4pi> in the curvature equation and how it relates to different curvature formulas presented.
  • Participants share results from their calculations, with discrepancies noted in the numerical outputs for curvature, prompting discussions about potential syntax errors and initial settings in the vector function.
  • One participant acknowledges an oversight in their function definition that led to incorrect results, leading to a corrected output.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correct curvature formula to use, and discrepancies in numerical results indicate ongoing confusion and differing interpretations of the problem.

Contextual Notes

Some participants mention potential syntax errors in their Mathematica code, which may affect the results. There are also references to different curvature formulas, indicating a lack of clarity on which is appropriate for the given vector function.

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
t or t_ in the Plot function?
 
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
<br /> \kappa = \left | \frac{f&#039;&#039;(x)}{(1 + f&#039;(x)^{2})^{\frac{3}{2}}} \right |<br />

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 = |\frac{r(t)&#039; X r(t)&#039;&#039;}{r(t)&#039;^3}| 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 ?
 
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 :)
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 22 ·
Replies
22
Views
7K
Replies
2
Views
3K
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
7K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K