Find a continuous solution of the Intial Value Problem
dy/dx + y = g(t), y(0) = 0
where g(t) = {2, when 0<=t<=1
and g(t) = {0, when t>1
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"
"d\\log y=-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)e^x"
"c(x)=c_0+\\int\\limits_{1}^{x}g(t)e^tdt"
If "0\\leq x\\leq1" then
"c(x)=c_0+\\int\\limits_{1}^{x}2e^tdt=c_0+2e^x-2e"
"y(x)=c(x)e^{-x}=2+(c_0-2e)e^{-x}"
"y(0)=2+c_0-2e=0"
"c_0=2e-2"
"y(x)=2+(c_0-2e)e^{-x}=2-2e^{-x}"
If x>1 then
"c(x)=c_0+\\int\\limits_{1}^{x}0e^tdt=2e-2"
"y(x)=c(x)e^{-x}=(2e-2)e^{-x}=2e^{1-x}-2e^{-x}"
Answer.
If "0\\leq x\\leq1" then "y(x)=2-2e^{-x}"
If x>1 then "y(x)=2e^{1-x}-2e^{-x}"
It is clear that this function is continuous.
Comments
Leave a comment