Re: Curvature for a circle
- To: mathgroup at smc.vnet.net
- Subject: [mg83110] Re: Curvature for a circle
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sun, 11 Nov 2007 02:59:46 -0500 (EST)
- Organization: The Open University, Milton Keynes, UK
- References: <fh3qqc$o9$1@smc.vnet.net>
dpdoughe at dialup4less.com wrote:
> It can easily be shown that the curvature for a circle of radius r is
> 1/r. How can I get Mathematica to show me this?
>
> I have defined a function to calculate the curvature for me assuming a
> vector-valued function.
>
> Curvature =
> Function[{V, x}, Norm[D[D[V, x]/Norm[D[V, x]], x]/Norm[D[V, x]]]];
>
> S = {2*Cos[theta], 2*Sin[theta]}
>
> ListPlot[Table[{t, Curvature[S, theta] /. theta -> t}, {t, 0, 2*Pi}]]
>
> I don't get anything for a plot. If I look at what my curvature
> formula calculates for me there are some questions as to if
> Abs' (Derivative of absolute value??) being left unevaluated.
>
> Any thoughts? It should be a straight-forward calculation....
Using the built-in function *Norm* may be not a good idea when dealing
with derivatives. As you witnessed, it might generates absolute values
*Abs* and Mathematica does not know how to differentiate such things.
What you should do in such cases is witting your own norm function as
illustrated in the example below.
norm = Function[{V}, Sqrt[V.V]];
Curvature =
Function[{V, x}, norm[D[D[V, x]/norm[D[V, x]], x]/norm[D[V, x]]]];
S = {2*Cos[theta], 2*Sin[theta]}
ListPlot[Table[{t, Curvature[S, theta] /. theta -> t}, {t, 0, 2*Pi}]]
In doing so, you get rid of the *Abs* function (and its unevaluated
derivative) as you can see by evaluating
Table[{t, Curvature[S, theta] /. theta -> t}, {t, 0, 2*Pi}]
HTH,
--
Jean-Marc