Differential Equation Exercise 16

We want to solve the following first-order differential equation:

$$ y' + y \cos x = \cos x $$

This is a linear differential equation of the form y' + y a(x) = b(x), where \( a(x) = \cos x \) and \( b(x) = \cos x \).

It can be solved using Lagrange’s method, also known as the integrating factor method.

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

Substituting \( a(x) = \cos x \) and \( b(x) = \cos x \):

$$ y = e^{- \int \cos x \, dx} \; \left[ \int \cos x \; e^{\int \cos x \, dx} \, dx + c \right] $$

The integral of \( \cos x \) is its antiderivative \( \sin x \):

$$ y = e^{-\sin x} \; \left[ \int \cos x \; e^{\sin x} \, dx + c \right] $$

The integral \( \int \cos x \; e^{\sin x} \, dx \) evaluates directly to \( e^{\sin x} \):

$$ y = e^{-\sin x} \; \left[ e^{\sin x} + c \right] $$

Multiplying through by \( e^{-\sin x} \):

$$ y = e^{-\sin x} \cdot e^{\sin x} + c \, e^{-\sin x} $$

$$ y = 1 + c \, e^{-\sin x} $$

Thus, the general solution is:

$$ y = 1 + c \, e^{-\sin x} $$

That completes the solution.

 
 

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