The given ODE is an inhomogeneous linear ordinary differential equation. We can apply the method of variation of parameters.
At first we solve the homogeneous equation:
dy/dx + y = 0
dy/y=−dx
dlogy=−dx
y=ce−x
If c is an arbitrary constant, the last equation is a general solution of the homogeneous ODE. In order to solve inhomogeneous ODE, consider c as a function on x. Then
dy/dx+y=(c′e−x−ce−x)+ce−x=c′e−x=g(x)
c′=g(x)ex
c(x)=c0+1∫xg(t)etdt
If 0≤x≤1 then
c(x)=c0+1∫x2etdt=c0+2ex−2e
y(x)=c(x)e−x=2+(c0−2e)e−x
y(0)=2+c0−2e=0
c0=2e−2
y(x)=2+(c0−2e)e−x=2−2e−x
If x>1 then
c(x)=c0+1∫x0etdt=2e−2
y(x)=c(x)e−x=(2e−2)e−x=2e1−x−2e−x
Answer.
If 0≤x≤1 then y(x)=2−2e−x
If x>1 then y(x)=2e1−x−2e−x
It is clear that this function is continuous.
Comments