How do you solve the differential equation (dy)/dx=e^(y-x)sec(y)(1+x^2)dydx=eyxsec(y)(1+x2), where y(0)=0y(0)=0 ?

1 Answer
Oct 25, 2014

By separating variables and integrating,

int e^{-y}cosy dy=int (1+x^2)e^{-x} dxeycosydy=(1+x2)exdx


Integration by Parts 1
u=e^{-y}" "dv=cosy dyu=ey dv=cosydy.
du=-e^{-y} dy" "v=sinydu=eydy v=siny.

Integration by Parts 2
u=e^{-y}" "dv=siny dyu=ey dv=sinydy.
du=-e^{-y}dy" "v=-cosydu=eydy v=cosy


By Integration by Pats 1,

(LHS)=e^{-y}siny+int e^{-y}siny dy(LHS)=eysiny+eysinydy

by Integration by Parts 2,

=e^{-y}siny-e^{-y}cosy-int e^{-y}cosy dy=eysinyeycosyeycosydy

Since the last integral is the same as (LHS)(LHS), we have

(LHS)=e^{-y}(siny-cosy)-(LHS)(LHS)=ey(sinycosy)(LHS)

by adding (LHS)(LHS),

Rightarrow2(LHS)=e^{-y}(siny-cosy)2(LHS)=ey(sinycosy)

by dividing by 22,

Rightarrow (LHS)=e^{-y}/2(siny-cosy)(LHS)=ey2(sinycosy)


Integration by Parts 3
u=1+x^2" "dv=e^{-x}dxu=1+x2 dv=exdx
du=2xdx" "v=-e^{-x}du=2xdx v=ex

Integration by Parts 4
u=2x" "dv=e^{-x}dxu=2x dv=exdx
du=2dx" "v=-e^{-x}du=2dx v=ex


Let us evaluate the right-hand side.

By Integration by Parts 3,

(RHS)=-(1+x^2)e^{-x}+int2xe^{-x}dx(RHS)=(1+x2)ex+2xexdx

by Integration by Parts 4,

=-(1+x^2)-2xe^{-x}+int 2e^{-x} dx=(1+x2)2xex+2exdx

=-(x^2+2x+1)e^{-x}-2e^{-x}+C=(x2+2x+1)ex2ex+C

=-(x^2+2x+3)e^{-x}+C=(x2+2x+3)ex+C


By setting (LHS)=(RHS)(LHS)=(RHS),

e^{-y}/2(siny-cosy)=-(x^2+2x+3)e^{-x}+Cey2(sinycosy)=(x2+2x+3)ex+C

Since y(0)=0y(0)=0, we have

Rightarrow 1/2(0-1)=-3+C Rightarrow C=5/212(01)=3+CC=52

Hence, the solution is implicitly expressed as

e^{-y}/2(siny-cosy)=-(x^2+2x+3)e^{-x}+5/2ey2(sinycosy)=(x2+2x+3)ex+52.


I hope that this was helpful.