Question #5b598

2 Answers
Jan 20, 2017

y=x-1+5e^(-x)

Explanation:

Linear differential eqn of type

(dy)/(dx)+Py=Q

where P,Q are either constants or functions of x

we use an integrating factor

IF=e^(int(Pdx))

in this case P=1

(dy)/(dx)+y=x

IF=e^(intdx)=e^x

multiply the ode by IF

e^x(dy)/(dx)+e^xy=xe^x

LHS is the result of the product rule for differentiation

d/(dx)(e^xy)=xe^x

Integrating both sides wrt x

e^xy=int(xe^x)dx

RHS is integrated by parts

I_(RHS)=uv-intvu'dx

u=x=>u'=1
v'=e^x=>v=e^x

so

e^xy=xe^x-inte^xdx

e^xy=xe^x-e^x+C

to find the constant we use the boundary condition

y(0)=4

e^0xx4=0xxe^0-e^0+C

4=-1+C=>C=5

e^xy=xe^x-e^x+5

tidy up by xxe^(-x)

y=x-1+5e^(-x)

Jan 20, 2017

y=5e^-x+x-1

Explanation:

First solve dy/(dx)+y=0 by separable variables:
intdy/y=-int1dx

ln y=-x + ln A where ln A is the arbitrary constant of integration

Hence y=Ae^-x (by raising e to the power of each side).
Now for the steady state, set spot that y=x-1 is a particular solution of the original equation on the left. (Or try out y-=ax+b and equate coefficients to find a and b.) So the general solution is:
y=Ae^-x+x-1 with A chosen to make y(0)=4:
4=Ae^0+0-1 so A=5 and the final solution is:

y=5e^-x+x-1

Check:
dy/(dx)+y=(cancel((-5)e^x)+cancel 1-0) + (cancel(5e^-x)+x-cancel 1)=x
and
y(0)=5e^0+0-1=5 xx 1 -1 = 4

enter image source here