Separation of Variables in Differential Equations

Aug 22, 2024

Solving Differential Equations by Separation of Variables

Example Problem 1:

Given: ( \frac{dy}{dx} = \frac{x^2}{y^2} )

  • Separate Variables:

    • Cross multiply:
      • ( y^2 dy = x^2 dx )
  • Integrate Both Sides:

    • Left Side: ( \int y^2 dy = \frac{y^3}{3} )
    • Right Side: ( \int x^2 dx = \frac{x^3}{3} + C )
  • Rearranging:

    • Multiply by 3: ( y^3 = x^3 + 3C )
    • Let ( C' = 3C ): ( y^3 = x^3 + C' )
    • Simplify: ( y = \sqrt[3]{x^3 + C} )
  • Particular Solution (given ( y(1) = 2 )):

    • Set up equation: ( 2^3 = 1^3 + C )
    • Solve for ( C ):
      • ( 8 = 1 + C )
      • ( C = 7 )
    • Particular Solution: ( y = \sqrt[3]{x^3 + 7} )

Example Problem 2:

Given: ( y' = xy )

  • Separate Variables:

    • Rewrite: ( dy = xy dx )
    • Divide by ( y ): ( \frac{1}{y} dy = x dx )
  • Integrate Both Sides:

    • Left Side: ( \int \frac{1}{y} dy = \ln |y| )
    • Right Side: ( \int x dx = \frac{x^2}{2} + C )
  • Exponentiate to Solve for y:

    • ( |y| = e^{\frac{x^2}{2} + C} )
    • Simplify: ( y = Ce^{\frac{x^2}{2}} )
  • Particular Solution (given ( y(0) = 5 )):

    • Set up equation: ( 5 = Ce^{0} )
    • Solve for ( C ): ( C = 5 )
    • Particular Solution: ( y = 5e^{\frac{x^2}{2}} )

Example Problem 3:

Given: ( \frac{dy}{dx} = y^2 + 1 )

  • Separate Variables:

    • Multiply by ( dx ): ( dy = (y^2 + 1) dx )
    • Rearrange: ( \frac{1}{y^2 + 1} dy = dx )
  • Integrate Both Sides:

    • Left Side: ( \int \frac{1}{y^2 + 1} dy = \tan^{-1}(y) )
    • Right Side: ( \int dx = x + C )
  • Solve for y:

    • Take tangent of both sides: ( y = \tan(x + C) )
  • Particular Solution (given ( y(1) = 0 )):

    • Set up equation: ( 0 = \tan(1 + C) )
    • Solve for ( C ): ( 1 + C = n\pi \Rightarrow C = n\pi - 1 )
    • Specific Solution: ( y = \tan(x + C) ) for any integer ( n )

Note: Always check your initial conditions and solutions for correctness.