Clairaut equations V1
by Reinaldo Baretti Machín
www.geocities.com/serienumerica2
www.geocities.com/serienumerica
[email protected]
The DE y= x (dy/dx) + a**2/(dy/dx) is solved
numerically subject to initial condition y(0)=1.
and the parameter a=1.
FORTRAN CODE
c Clairaut Morris & Brown Diff equations page 65 y=p*x+a**2/p
data xi,xf,nstep/0.,4.,6000/
data a,c/1.,1./
ysol(x)=c*x +a**2/c
dx=(xf-xi)/float(nstep)
y0=1.
yprime=a**2/y0
kp=int(float(nstep)/20.)
kount=kp
print*,'nstep,dx=',nstep,dx
print*,' '
print 100,xi,y0,ysol(xi)
do 10 i=1,nstep
x=xi+dx*float(i)
y1=y0+dx*(1./y0)*((x-dx)*yprime**2+a**2)
if(i.eq.kount)then
print 100,x,y1,ysol(x)
kount=kount + kp
endif
yprime=(y1-y0)/dx
y0=y1
10 continue
100 format(2x,'x,y,ysol=',3(2x,e10.3))
stop
end
nstep,dx= 6000 0.00066666666
x,y,ysol= 0.000E+00 0.100E+01 0.100E+01
x,y,ysol= 0.200E+00 0.120E+01 0.120E+01
x,y,ysol= 0.400E+00 0.140E+01 0.140E+01
x,y,ysol= 0.600E+00 0.160E+01 0.160E+01
x,y,ysol= 0.800E+00 0.180E+01 0.180E+01
x,y,ysol= 0.100E+01 0.200E+01 0.200E+01
x,y,ysol= 0.120E+01 0.220E+01 0.220E+01
x,y,ysol= 0.140E+01 0.240E+01 0.240E+01
x,y,ysol= 0.160E+01 0.260E+01 0.260E+01
x,y,ysol= 0.180E+01 0.280E+01 0.280E+01
x,y,ysol= 0.200E+01 0.300E+01 0.300E+01
x,y,ysol= 0.220E+01 0.320E+01 0.320E+01
x,y,ysol= 0.240E+01 0.340E+01 0.340E+01
x,y,ysol= 0.260E+01 0.360E+01 0.360E+01
x,y,ysol= 0.280E+01 0.380E+01 0.380E+01
x,y,ysol= 0.300E+01 0.400E+01 0.400E+01
x,y,ysol= 0.320E+01 0.420E+01 0.420E+01
x,y,ysol= 0.340E+01 0.440E+01 0.440E+01
x,y,ysol= 0.360E+01 0.460E+01 0.460E+01
x,y,ysol= 0.380E+01 0.480E+01 0.480E+01
x,y,ysol= 0.400E+01 0.500E+01 0.500E+01