exact solution?

If you have thge differential equation (dy/dx)=x + y, with initial condition Y(0)=1, how do you find the exact solution?

I can find the approximation using Euler's Method, but how do you solve that differential to solve the initial-value problem exactly?

2 Answers

  • qwert
    Lv 5
    1 decade ago
    Favorite Answer

    another way is to write it as a linear equation

    (dy/dx) - y =x

    P = -1 , Q = x

    integrating factor = e^{integral P dx} = e^(-x)

    solution is y*(I.F.) = integral {Q*(I.F.)}

    that is y*{e^(-x)} = integral {x * e^(-x)}

    using integration by parts,

    y*{e^(-x)} = { -x * e^(-x)} - { e^(-x)} + C

    or multiplying by e^x

    y = -x -1 +C e^x

    now apply the given condition y = 1 when x =0

    to get C =2

  • Pascal
    Lv 7
    1 decade ago


    Let g=e^(-x). Multiply by g:

    g dy/dx - gy = gx

    g dy/dx + y dg/dx = gx

    This is simply the product rule applied to gy. So:

    d(gy)/dx = gx

    gy = ∫gx dx

    ye^(-x) = ∫xe^(-x) dx

    Apply integration by parts:

    ye^(-x) = -xe^(-x) +∫e^(-x) dx

    ye^(-x) = -xe^(-x) - e^(-x) + C

    Divide by g:

    y = -x - 1 + Ce^x

    Plug in the initial condition:



    Thus the explicit solution is:

    y= -x - 1 +2e^x

Still have questions? Get your answers by asking now.