2.22   ODE No. 22

  1. Problem in Latex
  2. Mathematica input
  3. Maple input

y(x)y(x)2y(x)sin(2x)cos(2x)=0 Mathematica : cpu = 0.434147 (sec), leaf count = 113

{{y(x)sin(x)1cos(x)eK[1]2K[1]2K[1]21dK[1]ecos2(x)tan(x)cos2(x)1c1sin(x)cos(x)1cos(x)eK[1]2K[1]2K[1]21dK[1]+c1cos(x)}} Maple : cpu = 0.397 (sec), leaf count = 128

{y(x)=2sin(2x)2cos(2x)+2(_C1(cos(2x)+1)HeunCPrime(1,1/2,1/2,1,78,1/2cos(2x)+1/2)+HeunC(1,1/2,1/2,1,78,1/2cos(2x)+1/2)_C1+1/2HeunCPrime(1,1/2,1/2,1,78,1/2cos(2x)+1/2)2cos(2x)+2)(_C1HeunC(1,1/2,1/2,1,78,1/2cos(2x)+1/2)2cos(2x)+2+HeunC(1,1/2,1/2,1,78,1/2cos(2x)+1/2))1}

Hand solution

yy2ysin(2x)cos(2x)=0(1)y=y2+ysin(2x)+cos(2x)

This is Riccati first order non-linear ODE of the form of the general form y=P(x)+Q(x)y+R(x)y2 where P(x)=cos(2x),Q(x)=sin(2x),R(x)=1. It is best to first try to spot a particular solution yp and use the transformation y=yp+1u otherwise we use y=uyR(x) transformation. For this problem yp=tan(x)

To verify, since yp=1cos2x then plugging this particular in (1) gives

1cos2xtan2(x)tan(x)sin(2x)cos(2x)=0

But cos(2x)=cos2xsin2x and sin(2x)=2sinxcosx and tan(x)=sinxcosx therefore the above becomes

1cos2xsin2xcos2xsinxcosx(2sinxcosx)(cos2xsin2x)=01cos2xsin2xcos2x2sin2xcos2x+sin2x=01cos2xsin2xcos2xsin2xcos2x=01cos2xsin2xcos2x1=01sin2xcos2x1=0cos2xcos2x1=011=00=0

Therefore we, we can use y=yp+1u

y=tanx+1uy=1cos2xuu2

Equating this to (1) gives

uu2=y2+ysin(2x)+cos(2x)uu2=1cos2x+(tanx+1u)2+(tanx+1u)sin(2x)+cos(2x)

Using sin(2x)=2sinxcosx and cos2x=cos2xsin2x then above becomes

uu2=1cos2x+(tan2x+1u2+2utanx)+(sinxcosx+1u)2sinxcosx+(cos2xsin2x)u=u2cos2x(u2sin2xcos2x+1+2usinxcosx)(u2sinxcosx+u)2sinxcosxu2cos2x+u2sin2x=u2cos2xu2sin2xcos2x12usinxcosx2u2sinxcosxsinxcosx2usinxcosxu2cos2x+u2sin2x=u2cos2xu2sin2xcos2x12usinxcosx2u2sin2x2usinxcosxu2cos2x+u2sin2x=u2cos2xu2sin2xcos2x12usinxcosxu2sin2x2usinxcosxu2cos2x=u2(1cos2xsin2xcos2x(sin2x+cos2x))1+u(2sinxcosx2sinxcosx)=u2(1sin2xcos2x1)1+u(2sinxcosx2sinxcosx)=u2(cos2xcos2x1)1+u(2sinxcosx2sinxcosx)=1+2u(sinxcosxsinxcosx)

Hence

u+2u(tanx+sinxcosx)=1

Integrating factor is e2tanx+sinxcosxdx. But tanxdx=ln(cosx) And sinxcosxdx=12cos2x Hence μ=e2lncosxecos2x=1cos2xecos2x, therefore

d(1cos2xecos2xu)=1cos2xecos2x

Integrating both sides

1cos2xecos2xu=ecos2xcos2xdx+Cu=cos2xecos2x(Cecos2xcos2xdx)

Since y=tanx+1u then

y=tanx+1cos2xecos2x(Cecos2xcos2xdx)=tanx+ecos2xcos2x(Cecos2xcos2xdx)1

I do not know how Maple came up with the solution involving HeunC functions since ecos2xcos2xdx has no closed form solution. I should ask CAS experts about this.

Below is screen shot from Kamke book of the solution it gives, which matches the above result

pict