Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Exact differential equations

  1. Sep 13, 2011 #1
    i have to solve the following differential equation :

    dy/ dx + y = f(x) where f (x) = 2, 0 <= x < 1 and 0 if x >=1

    and y (0)=0.

    please explain how to solve it as it involves a discontinuous function ?

    I am stuck while computing after computing the integrating factor e^x. Please suggest how to proceed beyond this.
    Last edited: Sep 13, 2011
  2. jcsd
  3. Sep 13, 2011 #2


    User Avatar
    Science Advisor

    Yes, the integrating factor is [itex]e^x[/itex]. Multiplying both side of the equation by [itex]e^x[/itex] you have
    [tex]e^x\frac{dy}{dx}+ e^xy= e^xf(x)[/tex]
    [tex] \frac{d(e^xy)}{dx}= e^xf(x)[/tex]
    Integrate both sides to get
    [tex]e^x y(x)= \int_0^x tf(t)dt[/tex]
    (I chose the lower limit of integration to be 0 because the integral of any function from 0 to 0 so that gives y(0)= 0.)

    I suspect it is that integration that is bothering you. Take it "step by step".

    For [itex]0\le x\le 1[/itex] f(x)= 2 so [itex]e^xf(x)= 2e^x[/itex] on that interval.
    [itex]\int_0^x 2e^t dt= 2(e^x- e^0)= 2(e^x- 1)[/itex]
    Of course, for that, if x= 1, [itex]2(e- 1)[/itex]

    For x> 1, f(x)= 0 so [itex]e^x f(x)= 0[/itex]. [itex]\int_1^x 0 dx= 0[/itex] so [itex]\int_0^x e^xf(x)dx= 2(e- 1)[/itex].

    That is, the integral is [itex]2(e^x-1)[/itex] for [itex]0\le x\le 1[/itex] and the constant [itex]2(e- 1)[/itex] for [itex]x\ge 1[/itex].
  4. Sep 14, 2011 #3
    Thank a lot for this guidance, but i still have a doubt and hope that you may help me out this time as well. when f(x)=0 for x>=1 then how do we substitute x=1 in the solution obtained for 0<=x<1? please enlighten me on this
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook