Differential Equation - Exercise 5

We want to solve the differential equation:

$$ y' + x y = 0 $$

This is a first-order differential equation because the highest derivative of the unknown function is the first derivative \( y' \).

It is also a linear differential equation.

We can solve it in two equivalent ways.

Method 1 - Separation of Variables

We can solve the equation using the separation of variables technique.

Starting with:

$$ y' + x y = 0 $$

Rewrite \( y' \) as \( \frac{dy}{dx} \):

$$ \frac{dy}{dx} + x y = 0 $$

Separate the variables \( x \) and \( y \):

$$ \frac{dy}{dx} = -x y $$

$$ \frac{dy}{y} = -x \, dx $$

Integrate both sides:

$$ \int \frac{dy}{y} = \int -x \, dx $$

$$ \ln|y| = -\frac{x^2}{2} + C $$

Exponentiate both sides to isolate \( y \):

$$ y = e^{-\frac{x^2}{2} + C} $$

Since \( e^C \) is just a constant, we can write:

$$ y = C \, e^{-\frac{x^2}{2}} $$

This is the general solution to the equation.

Method 2 - Integrating Factor (Lagrange’s Method)

The equation is of the standard first-order linear form \( y' + a(x) y = b(x) \), with \( a(x) = x \) and \( b(x) = 0 \):

$$ y' + x y = 0 $$

The general solution is given by:

$$ y = e^{-\int a(x) \, dx} \left[ \int b(x) \, e^{\int a(x) \, dx} \, dx + C \right] $$

Substitute \( a(x) = x \) and \( b(x) = 0 \):

$$ y = e^{-\int x \, dx} \cdot C $$

Since \( \int x \, dx = \frac{x^2}{2} \), we get:

$$ y = C \, e^{-\frac{x^2}{2}} $$

Thus, the general solution is:

$$ y = C \, e^{-\frac{x^2}{2}} $$

Both methods lead to exactly the same result, confirming its correctness.

 

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Differential Equations

First-Order Differential Equations

Second-Order Differential Equations

Higher-Order Linear Equations

Examples and Practice Problems

Theory

Approximate Solutions