> From: Alasdair McAndrew
>
> Can Maxima produce the solution of an ODE in form of a power series?
> For example, the Riccati equation:
>
> dy/dx=x^2+y^2, y(0)=1
>
> has a complicated closed-form solution using Bessel functions, but
> sometimes a few terms of the series is all you need.
As the author of ode1_riccati, I hope you are checking the solution.
I have tested it extensively, but I haven't moved it out contrib yet.
(%i1) load('contrib_ode);
(%o1) /usr/people/billingd/.maxima/contrib_ode.mac
(%i2) de:'diff(y,x)=x^2+y^2;
dy 2 2
(%o2) -- = y + x
dx
(%i3) ans:contrib_ode(de,y,x);
(%o3) [y =
2 2 2
5 x 3 x 2 1 x
(bessel_j(- -, --) %c + bessel_j(- -, --)) x + bessel_j(- -, --) %c
4 2 4 2 4 2
- --------------------------------------------------------------------]
2 2
1 x 1 x
(bessel_j(- -, --) %c + bessel_j(-, --)) x
4 2 4 2
OK. The solution seems OK using ode_check() and the Bessel function
identity (see share/contrib/diffequations/tests/rtest_ode1_riccati.mac)
besjident(n,x):=bessel_j(n,x)=2*(n-1)*bessel_j(n-1,x)/x-bessel_j(n-2,x);
What happens at x=0? You probably want to plot some direction fields
or similar to investigate the DE behaviour.
> As a related question, how do I use the diffequations/ode1_riccati.mac
> solver to include an initial condition?
There is no way to do it automatically yet. Substitute the initial conditions
into the solution and solve for %c.
NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.