Solving Riccati DE's with initial conditions?



Try something like this:

 (%i21) load(contrib_ode)$

 (%i22) sol : ode1_riccati('diff(y,x) = x^2+y^2,y,x)$

 (%i23) subst([y=0,x=1],%)$

 (%i24) solve(%,%c)$

 (%i25) subst(%,sol);

(%o25) y=((bessel_j(5/4,x^2/2)-((bessel_j(3/4,x^2/2)-bessel_j(-5/4,x^2/2))*(bessel_j(5/4,1/2)-bessel_j(1/4,1/2)-bessel_j(-3/4,1/2)))/(bessel_j(3/4,1/2)-bessel_j(-1/4,1/2)-bessel_j(-5/4,1/2))-bessel_j(-3/4,x^2/2))*x^2+(bessel_j(-1/4,x^2/2)*(bessel_j(5/4,1/2)-bessel_j(1/4,1/2)-bessel_j(-3/4,1/2)))/(bessel_j(3/4,1/2)-bessel_j(-1/4,1/2)-bessel_j(-5/4,1/2))-bessel_j(1/4,x^2/2))/((2*bessel_j(1/4,x^2/2)-(2*bessel_j(-1/4,x^2/2)*(bessel_j(5/4,1/2)-bessel_j(1/4,1/2)-bessel_j(-3/4,1/2)))/(bessel_j(3/4,1/2)-bessel_j(-1/4,1/2)-bessel_j(-5/4,1/2)))*x)


The solution is messy. (And) so it goes.

--Barton


________________________________
From: maxima-bounces at math.utexas.edu [maxima-bounces at math.utexas.edu] on behalf of Alasdair McAndrew [amca01 at gmail.com]
Sent: Wednesday, August 28, 2013 06:51
To: maxima list
Subject: Solving Riccati DE's with initial conditions?

The contrib_ode package and its subsidiary functions can easily solve a Riccati equation such as

y' = x^2+y^2

But I can't find any way (at least in the package itself), of solving an initial value problem; say:

y' = x^2+y^2, y(1)=0.

I've tried using "atvalue" but the answer is still given in terms of an arbitrary constant %c of integration.  Is there something I'm missing here?  None of the problems in the de_test.txt file contain initial conditions.

Thanks,
Alasdair

--
Blog: http://amca01.wordpress.com
Web:  http://sites.google.com/site/amca01/
Facebook: http://www.facebook.com/alasdair.mcandrew