Re: Time needed for calculation

• To: mathgroup at smc.vnet.net
• Subject: [mg62429] Re: [mg62411] Time needed for calculation
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Thu, 24 Nov 2005 06:33:27 -0500 (EST)
• References: <200511230612.BAA14203@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```JikaiRF at AOL.COM wrote:
> Dear Sirs,
> I have some questions about how long a computer can calculate, without
> damages on hard wear.
> More specifically speaking, I intend to depict trajectories on (k, c) axis,
> which are derived from programming on Mathematica.
> My program is as follows:
>
> << Graphics`ImplicitPlot`
> L = 48;
>
> a = 0.1;
>
> A = 1;
>
> r = 0.1;
>
> t = 0.046296296296296294`;
>
> ImplicitPlot[A r L (1 - a)((1 -t) c k^a == (a+(1-a)(1- t)) L^2 (1-a)^2 (1- t
> )^3 k^(3a-1)
>                      +L(1-a) c (1- t) (-A(a+(1-a)(1- t))(2- t)-(1-a)(1- t)^2
> +A a(1- t)) k^(2a-1)
>                      +A c^2 (A(a+(1-a)(1- t))+(1-a)(1- t) -A a(1- t)) k^(a-1)
> +A^2 r c^2, {k, 0.8, 1.5}]
>
> This program seems to work well.   However, I cannot obtain the curve which
> should be derived from the above program, though my computer continues to
> calculate more than fifteen minutes.
>
> I would like to know how   long a computer can calculate without damages on
> hardware, and additionally how long it takes to obtain the required curve based
> on my computer.
> Especially, my computer is PowerBook G4 with 1.5 GHz processor.
>
>      Sincerely,
>      Fujio Takata.
>

I have no idea what sort of computation load a PowerBook can handle.
Also it is not at all clear what you did to find the curve in question.
The approach below will get you a polynomial reasonably fast.

expr = (-A)*r*L*(1 - a)*(1 - t)*c*k^a + (a + (1 - a)*(1 - t))*
L^2*(1 - a)^2*(1 - t)^3*k^(3*a - 1) +
L*(1 - a)*c*(1 - t)*((-A)*(a + (1 - a)*(1 - t))*(2 - t) -
(1 - a)*(1 - t)^2 + A*a*(1 - t))*k^(2*a - 1) +
A*c^2*(A*(a + (1 - a)*(1 - t)) + (1 - a)*(1 - t) -
A*a*(1 - t))*k^(a - 1) + A^2*r*c^2

In[25]:= rexpr = Rationalize[expr, 0]

Out[25]=
c^2/10 + (6375024143593*c^2)/(3703618114621*k^(9/10)) -
(388844671178*c)/(3636250307*k^(4/5)) +
307126999725/(197967319*k^(7/10)) -
(165668129149671*c*k^(1/10))/40210710958658

Now convert to a Laurent polynomial (only integer powers) by removing
the denominator power in k.

In[37]:= rexpr2 = PowerExpand[rexpr /. k -> l^10]

Out[37]=
c^2/10 + (6375024143593*c^2)/(3703618114621*l^9) -
(388844671178*c)/(3636250307*l^8) +
307126999725/(197967319*l^7) - (165668129149671*c*l)/
40210710958658

We can recover an implicit polynomial by eliminating l from the system
{rexpr2,l^10-k}.

imppoly =
First[GroebnerBasis[{rexpr2, l^10 - k}, {c, k}, l,
MonomialOrder -> EliminationOrder]]

The resulting polynomial will be quite resistant to direct use of
ImplicitPlot because the coefficients are too large to find zeros via
e.g. subdivision with machine arithmetic. I get what appears to be a
reasonable result from rescaling numerically as below.

In[75]:= imppoly2 = N[Expand[imppoly/10^450]]

Out[75]=
-0.44710407299089117*c^20 + 3.6929000651811335*^15*c^10*k -
5.435249465194847*c^19*k - 1.5816021229154092*^29*k^2 +
5.590311570192779*^16*c^9*k^2 - 23.71722762253775*c^18*k^2 +
2.8406692481577024*^17*c^8*k^3 - 43.059424056179864*c^17*k^3 +
5.701837604927303*^17*c^7*k^4 - 28.130472729642648*c^16*k^4 +
3.901760263753945*^17*c^6*k^5 - 2.2597182065813595*c^15*k^5 +
4.17821551222496*^16*c^5*k^6 - 3.1477095526033976*c^14*k^6 +
13.931088647720639*c^13*k^7 - 61.13817833192989*c^12*k^8 +
266.15182908720067*c^11*k^9 + 1.9581785245917768*^-13*c^20*
k^9 - 2759.462163976083*c^10*k^10

That is, the plot one might obtain as below gives something visually
similar to what I saw with the implicit plot of expr. But it has a new
graphical component (though not a distinct algebraic component, because
the polynomial is irreducible). I would guess this corresponds to
"parasite" solutions when one goes back to the radical formulation of
the implicit equation.

ImplicitPlot[imppoly2 == 0, {k, 0.1, 100}, {c, 5, 80}]

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Boolean Integral
• Next by Date: Re: Re: Lost connection to license server
• Previous by thread: Re: Time needed for calculation
• Next by thread: Re: Re: Time needed for calculation