       Re: Differentiating Functions and Root objects [ was Re: ArcCos[]]

• To: mathgroup at smc.vnet.net
• Subject: [mg24847] Re: [mg24833] Differentiating Functions and Root objects [ was Re: ArcCos[]]
• From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
• Date: Wed, 16 Aug 2000 03:24:11 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```I just noticed a very easy way to find complete solution of Gianluca's
problem. My previous mesage found only the real roots of the equation, but
the original question asked for all solutions, real and complex.  (That is
one difference between using Solve and
Experimental`CylindricalAlgebraicDecomposition.) However, we can actually
prove that there are no solutions except the real ones. To do so let's
consider the problem again:

In:=
f[t_] := Root[-t + 2*#1 + 2*t^2*#1 + #1^3 &, 1]
In:=
Numerator[D[f[t], t]]
Out=
2        3
1 - 4 t Root[-t + 2 #1 + 2 t  #1 + #1  & , 1]

For this expression to be zero the following would have to hold:

1 / (4 t)==Root[-t + 2 #1 + 2 t  #1 + #1  & , 1]

But that means that 1/(4t) would have to be a root of the equation

In:=
(t + 2*#1 + 2*t^2*#1 + #1^3 & )[x] == 0
Out=
2      3
t + 2 x + 2 t  x + x  == 0

So let's substitute 1/(4t) for x and solve:

In:=
sols=Solve[(-t + 2*#1 + 2*t^2*#1 + #1^3 & )[1/(4*t)] == 0, t]
Out=
1        3                       1        3
{{t -> -I Sqrt[-(-) + ---------]}, {t -> I Sqrt[-(-) + ---------]},
2    4 Sqrt                   2    4 Sqrt

1       3                   1       3
{t -> -Sqrt[- + ---------]}, {t -> Sqrt[- + ---------]}}
2   4 Sqrt               2   4 Sqrt
In:=
sols // N
Out=
{{t -> 0. - 0.174155 I}, {t -> 0. + 0.174155 I}, {t -> -1.01505}, {t ->
1.01505}}

We see that the real roots are just the ones we got earlier. We can also
check that the imaginary roots do not satisfy the original equation:

In:=
Numerator[f[t]] /. sols // FullSimplify
Out=
3 + Sqrt[3 (-45 + 32 Sqrt)]  3 + Sqrt[3 (-45 + 32 Sqrt)]
{------------------------------, ------------------------------, 0, 0}
2                               2

on 8/15/00 2:18 PM, Andrzej Kozlowski at andrzej at tuins.ac.jp wrote:

> Allan:
>
> 1. I am afraid that you allowed yourself to be tricked by FindRoot :)
>
> The root you found {t -> -818.986} is a pure illusion. The only roots are the
> ones given in my earlier message on the same topic: -1.01505 and 1.01505. You
> can see this simply by plotting the function:
>
> In:=
> Plot[Evaluate[D[Root[-t + 2*#1 + 2*t^2*#1 + #1^3 &, 1],t]],{t,-10,10}]
>
> But actually Mathematica can prove it algebraicalluy and very fast too using
> Experimental`CylindricalAlgebraicDecomposition.
>
> In:=
> f[t_]:=D[Root[-t + 2*#1 + 2*t^2*#1 + #1^3 &, 1],t]
> In:=
> Experimental`CylindricalAlgebraicDecomposition[f[t]==0,t]
> Out=
> 2        4
> t == Root[-1 - 32 #1  + 32 #1  & , 1] ||
>
> 2        4
> t == Root[-1 - 32 #1  + 32 #1  & , 2]
> In:=
> N[%]
> Out=
> t == -1.01505 || t == 1.01505
>
>
> 2.  In general, a Root object depending on parameters has a complicated
> branching structure with respect to these parameters and at certain points
> will not be continuous, and hence certainly not differentiable (as a complex
> function). Other than that (and barring bugs) differentiation of root objects
> wiht respect to parameters is valid. However note one pitfall.  The case
> considered here is rather special: we are looking at a cubic f[t_]:= Root[-t +
> 2*#1 + 2*t^2*#1 + #1^3 & with real coefficients, and Root[f[t],1]--its real
> root. The function can be viewed either as a real function or a complex
> function. In the first case case, the derivative D[f[t],t] exists at 0 and  we
> get:
>
> In:=
> D[f[t],t]/.t->0
> Out=
> 1
> -
> 2
>
>
> However both
>
> In:=
> Limit[(f[t]-f)/t,t->0]
>
> and
>
> In:=
> f[t]+O[t]^2
>
> fail, since the complex derivative of f at 0 does not exist.

```

• Prev by Date: RE: Confusing Behavior of LogPlot vs. Plot
• Next by Date: Re: A simple problem
• Previous by thread: Re: Differentiating Functions and Root objects [ was Re: ArcCos[]]
• Next by thread: Re: Differentiating Functions and Root objects [ was Re: ArcCos[]]