Re: DSolve problems with system of ODEs. Out in pure notation?
- To: mathgroup at smc.vnet.net
- Subject: [mg21756] Re: DSolve problems with system of ODEs. Out in pure notation?
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Thu, 27 Jan 2000 22:56:38 -0500 (EST)
- References: <200001210900.EAA06601@smc.vnet.net> <200001220753.CAA11688@smc.vnet.net> <86e8o3$fbv@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I have deleted the graphic display and most of the output.
eqns = {x'[t] == -0.036 x[t] + 0.0124 y[t] + 0.000035 z[t] + 49.3,
y'[t] == 0.0111 x[t] - 0.0286 y[t],
z'[t] == 0.0039 x[t] - 0.000035 z[t], x[0] == 0, y[0] == 0, z[0] ==
0};
soln = DSolve[ eqns, {x[t], y[t], z[t]}, t];
I am not sure what caused the error message.
We can get what they indicate by Help Browser > GoTo [RootSum::pfn] with
Other Information chosen from the category buttons. We get
"Generated when the first argument in RootSum is not a Function expression."
However it looks as if it is serious, since the solution is incorrect:
soln /. t -> 0
{{x[0] -> 1.77331, y[0] -> -0.546333, z[0] -> -0.192132}}
But, in reply to your question about the form of the answer:
RootSum[f, form]represents the sum of form[x]for allx that satisfy the
polynomial equationf[x] == 0.
This is very useful notation - for mathematics in general, not just for
Mathematica.
In this case we can convert to standard notation (but it takes a while)
ToRadicals[soln]
And, with another wait, to traditional notation
TraditionalForm[%]
Since your input includes inexact numbers, you might accept the muchs
shorter form.
N[soln]
Or maybe a numerical solution over some range of t (I have used -1 to 1)
Numsoln = NDSolve[eqns, {x[t], y[t], z[t]}, {t, -1, 1}]
This is OK at t=0:
Numsoln /. t -> 0
{{x[0] -> 0., y[0] -> 0., z[0] -> 0.}}
To check on the values throughout the t-range it is convenient to convert
the solution to one for the functions x,y and z:
FunNumsoln = Nsoln /. f_[t] -> f
and, in eqns change Equal to Subtract:
diffs = eqns /. Equal -> Subtract
Now plot diffs with the functions substitued for x, y, z (with a perfect
solution each would give constant zero function)
Plot[Evaluate[diffs /. FunNumsoln], {t, -1, 1}, PlotRange -> All];
The maximum absolute error looks to be less than 0.000035.
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"J.Guillermo Sanchez" <guillerm at gugu.usal.es> wrote in message
news:86e8o3$fbv at smc.vnet.net...
> If I evaluate,
>
> DSolve[{x'[t] == -0.036 x[t] + 0.0124 y[t] + 0.000035 z[t] + 49.3,
> y'[t] == 0.0111 x[t] - 0.0286 y[t], z'[t] == 0.0039 x[t] - 0.000035
> z[t],
> x[0] == 0, y[0] == 0, z[0] == 0}, {x[t], y[t], z[t]}, t]
>
> I receive a massage like this
> (RootSum::"pfn" :
> "(DSolve`DSolveDump`dysfunction$6[273147 + <<1>>...
> is not a pure function.).
> and them a out in pure notation.
>
> But I want to receive the solution in standard notation.
>
> Also the same sentece work fine in Mathematica 2.2.
>
> Can anyone give a hand?
>
>
>
>
- References:
- Intersection of 2 subspaces
- From: RENAULT Fabien <renaulf1@cti.ecp.fr>
- Re: Intersection of 2 subspaces
- From: Daniel Lichtblau <danl@wolfram.com>
- Intersection of 2 subspaces