MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Abs''[1]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106007] Abs''[1]
  • From: Sam Takoy <samtakoy at yahoo.com>
  • Date: Wed, 30 Dec 2009 04:13:31 -0500 (EST)
  • Organization: A noiseless patient Spider

Hi,

The following code produces a mysterious Abs''[1].

First, why is it produced?
Second, why isn't it evaluated to zero (second derivative of Abs at 1)?
Third, if there's anything else that I'm doing wrong in my code, please 
let me know.

Thanks in advance,

Sam


Clear["Global`*"]
Simp[a_, b_][expr_] :=
   Simplify[expr,
    Assumptions -> a > 0 && a < Pi/2 && b > 0 && b < Pi/2];
FSimp[a_, b_][expr_] :=
   FullSimplify[expr,
    Assumptions -> a > 0 && a < Pi/2 && b > 0 && b < Pi/2];

ComputeCs3D[zi_] := (
   ddt = Derivative[1, 0, 0];
   dd1 = Derivative[0, 1, 0];
   dd2 = Derivative[0, 0, 1];
   vi = ddt[zi];

   zialpha[t_, a_, b_] := {dd1[zi][t, a, b], dd2[zi][t, a, b]};
   salphabeta =
    Dot[zialpha[#1, #2, #3], Transpose[zialpha[#1, #2, #3]]] &;
   sAlphaBeta = Inverse[salphabeta[#1, #2, #3]] &;
   ni[t_, a_, b_] :=
    Cross[zialpha[t, a, b][[1]], zialpha[t, a, b][[2]]]/
     Norm[Cross[zialpha[t, a, b][[1]], zialpha[t, a, b][[2]]]];
   c[t_, a_, b_] := Dot[ni[t, a, b], vi[t, a, b]] // FSimp [a, b];
   c1[t_, a_, b_] :=
    ddt[c][t, a, b] -
      Dot[zialpha[t, a, b], vi[t, a, b],
       sAlphaBeta[t, a, b], {dd1[c][t, a, b], dd2[c][t, a, b]}] //
     Simp[a, b];
   c2[t_, a_, b_] :=
    ddt[c1][t, a, b] -
      Dot[zialpha[t, a, b], vi[t, a, b],
       sAlphaBeta[t, a, b], {dd1[c1][t, a, b], dd2[c1][t, a, b]}] //
     Simp[a, b];

   {c[#1, #2, #3], c1[#1, #2, #3], c2[#1, #2, #3]} &
   )
zi[t_, theta_, phi_] := {(1 + \[Epsilon] t)*Sin[theta] Cos[phi],
    Sin[theta] Sin[phi], Cos[theta]};
ComputeCs3D[zi][0, \[Theta], \[Phi]] //
   FSimp[ \[Theta], \[Phi]] // MatrixForm


  • Prev by Date: Re: Return in function
  • Next by Date: Re: Re: Replace and ReplaceAll -- simple application
  • Previous by thread: Re: Weird localization bug!
  • Next by thread: sampling a spline