the differential equation is :

$$\frac{dy}{dx}+y=f(x),~~~~~~~~ y(0)=0$$


$$f(x)=\cases{2,& if $0\le x\lt1$\\0,& if $x\ge 1$}.$$

So what i did was....

since it is a linear differential equation, i calculated its I.F(integrating factor)= $e^x$

and used..

$$y(I.F)=\int (e^x f(x)+c\tag{1})\,dx.$$

Now, how should i use the splitting of $f(x)$ to solve for $y$ in $(1)$

Please help

  • $\begingroup$ Another approach is Laplace transforms. $\endgroup$ – Amzoti Jan 17 '15 at 15:17
  • $\begingroup$ @Amzoti i have no idea of that, i'll look into it for sure. $\endgroup$ – Shobhit Jan 17 '15 at 15:21
  • $\begingroup$ write up two solution in the different range and match them at the boundary by requiring $y$ to be continuous. the derivative will certainly have a jump. $\endgroup$ – abel Jan 20 '15 at 16:29

solving for $y$ in the interval $[0,1],$ you find $y = 2 -2 e^{-x}$ and $y(1) = 2 - 2/e.$ use this as the initial value and solve $\dfrac{dy}{dx} + y = 0$ to get $y = 2(e-1)e^{-x}$ for $x \ge 1$.

  • $\begingroup$ oh yeah, got it. thnks $\endgroup$ – Shobhit Jan 22 '15 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.