MathGroup Archive 1997

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

Search the Archive

Fwd: Roots of an equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg6655] Fwd: [mg6582] Roots of an equation
  • From: BobHanlon at aol.com
  • Date: Wed, 9 Apr 1997 00:34:22 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Attempting to directly solve the equation using

Solve[1/x^4 + 1/y^2 + 2 == (1/(y^2 - x^2) )^(5/3), y]

does not work and results in exceeding the memory allocation.  Consequently,
a numerical solution is required.

Module[{x, y}, Table[{x, y /. 
	NSolve[1/x^4 + 1/y^2 + 2 == (1/(y^2 - x^2) )^(5/3), y]},
	{x, -5, 5, 2}]] // Timing

{5.56667 Second,{{-5,{-5.06477,5.06477}},{-3,{-3.10448,
        3.10448}},{-1,{-1.20712,1.20712}},{1,{-1.20712,1.20712}},{
      3,{-3.10448,3.10448}},{5,{-5.06477,5.06477}}}}

As expected, the function is multivalued with even symmetry about both axis.
 Note that the timing reflects that the use of NSolve is slow (this is on a
Power Computing 604e running at 225 Mhz).

f1[x_ /; x == 0] := 0;
f1[x_] := Module[{y}, y /. NSolve[
	1/x^4 + 1/y^2 + 2 == (1/(y^2 - x^2) )^(5/3), y][[2]]]; (* positive *)

For large values of x (and hence large values of y), the roots will approach
the roots of

Solve[2^(-3/5) == y^2 - x^2, y] // Simplify

\!\({{y \[Rule] \(-\ at \(1\/2\^\(3/5\) + x\^2\)\)}, {
      y \[Rule] \ at \(1\/2\^\(3/5\) + x\^2\)}}\)

This estimate can be used with FindRoot to avoid using NSolve for large x (x
>= 1).

f2[x_ /; x == 0] := 0;
f2[x_ /; Abs[x] < 1] := Module[{y}, y /. NSolve[
	1/x^4 +1/y^2 +2 == (1/(y^2 - x^2) )^(5/3), y][[2]]]; (* positive *)
f2[x_] := Module[{y}, y /. FindRoot[
	1/x^4 +1/y^2 +2 == (1/(y^2 - x^2) )^(5/3), 
	{y, Sqrt[2^(-3/5) + x^2]}]] (* symmetry *)

Red = RGBColor[1, 0, 0]; Blue = RGBColor[0, 0, 1];

Plot[{f[x], Sqrt[2^(-3/5) + x^2]}, {x, 0, 5}, 
	PlotStyle -> {{Red}, {Blue, AbsoluteDashing[{5, 5}]}}]

[PostScript deleted]

12.35 Second

Note that FindRoot is much faster than Nsolve.

(Timing[Do[f1[#], {2}]][[1]] / Timing[Do[f2[#], {2}]][[1]])& /@
	{1., 3., 5.}

{70.,85.,71.}

---------------------
Forwarded message:
From:	jtt at deltanet.com (Jaimee Tahsiri)
To: mathgroup at smc.vnet.net
To:	mathgroup at smc.vnet.net

I appreciate it if someone in your group to write me a short mathematica
program to solve the real roots of this equation.

1/x^4 +1/y^2 +2 = ( 1/(y^2 - x^2) )^(5/3)

A million thanks to anyone that can help me.




  • Prev by Date: Re: Q. How to work with derivative?
  • Next by Date: Solving recursive functions
  • Previous by thread: Re: Roots of an equation
  • Next by thread: Parenthesis in 3.0 plot labels