Differential Equation Exercise 4

We’re given the following first-order differential equation:

$$ xy' + y = 0 $$

This is a first-order differential equation because the highest derivative that appears is the first derivative, y'.

Let’s isolate y' in terms of x and y:

$$ y' = - \frac{y}{x} $$

This is a separable differential equation of the form y' = f(x)g(y), with f(x) = - 1/x and g(y) = y.

We now rewrite the equation using the notation dy/dx:

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

Next, we separate the variables:

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

We integrate both sides with respect to their respective variables:

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

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

The integral on the left yields the antiderivative F(y) = log(y) + c1:

$$ \log(y) + c_1 = - \int \frac{1}{x} \, dx $$

Evaluating the right-hand side gives F(x) = log(x) + c2:

$$ \log(y) + c_1 = -\log(x) + c_2 $$

We can combine the constants c1 and c2 into a single constant c3 = c2 + c1.

The sign of the constant is irrelevant, as arbitrary constants can take any real value.

$$ \log(y) = -\log(x) + c_3 $$

Bringing the logarithmic terms to the same side:

$$ \log(y) + \log(x) = c_3 $$

Using the logarithmic identity log(y) + log(x) = log(xy):

$$ \log(xy) = c_3 $$

Exponentiating both sides to eliminate the logarithm:

$$ e^{\log(xy)} = e^{c_3} $$

$$ xy = e^{c_3} $$

Since \( e^{c_3} \) is just a positive constant, we can denote it as c:

$$ xy = c $$

Solving for y, we find the general solution of the differential equation:

$$ y = \frac{c}{x} $$

    Alternative Solution Method

    We can also solve the original differential equation using a different approach:

    $$ xy' + y = 0 $$

    Divide both sides of the equation by x:

    $$ \frac{xy' + y}{x} = \frac{0}{x} $$

    $$ y' + \frac{y}{x} = 0 $$

    This is a linear first-order differential equation of the form y' + a(x)y = b(x), where a(x) = 1/x and b(x) = 0.

    We can solve it using the integrating factor method:

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

    Substituting a(x) = 1/x and b(x) = 0 gives:

    $$ y = e^{-\int \frac{1}{x} \, dx} \cdot \left[ \int 0 \cdot e^{\int \frac{1}{x} \, dx} \, dx + c \right] $$

    $$ y = e^{-\int \frac{1}{x} \, dx} \cdot c $$

    The integral ∫1/x dx = log(x) + constant, but since we already have a constant c outside, we write:

    $$ y = e^{-\log(x)} \cdot c $$

    $$ y = \frac{1}{e^{\log(x)}} \cdot c $$

    Because the exponential and the logarithm are inverse functions, e{log(x)} = x:

    $$ y = \frac{1}{x} \cdot c $$

    Once again, we find the general solution of the differential equation:

    $$ y = \frac{c}{x} $$

    As expected, both methods lead to the same result.

    And so on.

     
     

    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