Differential Equations - Linear Differential Equation & its Solution
- In this lecture, we will learn about linear differential equations and how to find their solutions.
- A linear differential equation can be written in the form:
$$\frac{{dy}}{{dx}} + P(x)y = Q(x)$$
- Here, the functions P(x) and Q(x) are given.
- The goal is to find the function y(x) that satisfies this equation.
- Let’s consider an example to understand this better.
Example 1:
- Find the solution to the differential equation:
$$\frac{{dy}}{{dx}} + 2xy = x$$
- Solution:
- To solve this equation, we need to find an integrating factor, which is given by the formula:
$$I(x) = e^{\int P(x) dx}$$
- In our case, P(x) = 2x, so the integrating factor becomes:
$$I(x) = e^{\int 2x dx} = e^{x^2}$$
- Multiply the given differential equation by the integrating factor:
$$e^{x^2} \frac{{dy}}{{dx}} + 2xe^{x^2}y = xe^{x^2}$$
- Notice that the left-hand side can be simplified using the product rule of differentiation. Can you give it a try?
Example 2:
- Find the solution to the differential equation:
$$\frac{{dy}}{{dx}} - \frac{{2x}}{{x^2 + 1}}y = \cos(x)$$
- Solution:
- To solve this equation, we need to find an integrating factor, which is given by the formula:
$$I(x) = e^{\int P(x) dx}$$
- In our case, P(x) = -\frac{{2x}}{{x^2 + 1}}, so the integrating factor becomes:
$$I(x) = e^{\int -\frac{{2x}}{{x^2 + 1}} dx}$$
- This integral can be evaluated using a substitution. Can you give it a try?
(10)
- Multiply the given differential equation by the integrating factor:
$$e^{\int -\frac{{2x}}{{x^2 + 1}} dx} \frac{{dy}}{{dx}} - \frac{{2x}}{{x^2 + 1}}e^{\int -\frac{{2x}}{{x^2 + 1}} dx}y = \cos(x)e^{\int -\frac{{2x}}{{x^2 + 1}} dx}$$
- Simplify the left-hand side using the product rule of differentiation:
$$\frac{{d}}{{dx}}\left(ye^{\int -\frac{{2x}}{{x^2 + 1}} dx}\right) = \cos(x)e^{\int -\frac{{2x}}{{x^2 + 1}} dx}$$
- Integrate both sides of the equation:
$$\int \frac{{d}}{{dx}}\left(ye^{\int -\frac{{2x}}{{x^2 + 1}} dx}\right) dx= \int \cos(x)e^{\int -\frac{{2x}}{{x^2 + 1}} dx}dx$$
- Apply the fundamental theorem of calculus to evaluate the integrals on both sides.
- Solve the integral on the left-hand side:
$$ye^{\int -\frac{{2x}}{{x^2 + 1}} dx} = \int \cos(x)e^{\int -\frac{{2x}}{{x^2 + 1}} dx}dx + C$$
- Here, C is the constant of integration.
- Divide both sides of the equation by the integrating factor:
$$y = e^{-\int -\frac{{2x}}{{x^2 + 1}} dx} \left(\int \cos(x)e^{\int -\frac{{2x}}{{x^2 + 1}} dx}dx + C\right)$$
- Simplify the exponential term using the properties of exponents.
- Evaluate the integral on the right-hand side:
$$y = e^{-\int -\frac{{2x}}{{x^2 + 1}} dx} + \sin(x) + C$$
- Substitute the value of the integral back into the equation.
- Final Solution:
$$y = e^{-\int -\frac{{2x}}{{x^2 + 1}} dx} + \sin(x) + C$$
- This is the general solution to the given differential equation.
- Now, let’s consider an initial value problem to find the particular solution to the differential equation.
- An initial value problem involves finding the solution that satisfies certain conditions at a specific point.
- For example, let’s say we have the following initial condition:
$$y(0) = 2$$
- We can substitute this value into the general solution to find the particular solution.
- Substituting the initial condition into the general solution:
$$2 = e^{-\int -\frac{{2(0)}}{{(0)^2 + 1}} dx} + \sin(0) + C$$
$$2 = e^0 + 0 + C$$
$$2 = 1 + C$$
- Solving for C:
$$C = 2 - 1 = 1$$
- Therefore, the particular solution to the given initial value problem is:
$$y = e^{-\int -\frac{{2x}}{{x^2 + 1}} dx} + \sin(x) + 1$$
- In summary, we learned about linear differential equations and how to find their solutions.
- We used the concept of an integrating factor to simplify the equation and solve for the unknown function.
- By integrating both sides of the equation and applying the fundamental theorem of calculus, we found the general solution.
- We also discussed how to solve initial value problems and find the particular solution that satisfies certain conditions.
- Differential equations are an important topic in mathematics and have wide applications in various fields.
- Example 3:
- Find the solution to the differential equation:
$$\frac{{dy}}{{dx}} + \frac{{2y}}{{x}} = 3x$$
- Solution:
- To solve this equation, we need to find an integrating factor, which is given by the formula:
$$I(x) = e^{\int P(x) dx}$$
- In our case, P(x) = \frac{{2}}{{x}}, so the integrating factor becomes:
$$I(x) = e^{\int \frac{{2}}{{x}} dx}$$
- Evaluate the integral to find the value of the integrating factor.
- Multiply the given differential equation by the integrating factor:
$$e^{\int \frac{{2}}{{x}} dx}\frac{{dy}}{{dx}} + \frac{{2}}{{x}}e^{\int \frac{{2}}{{x}} dx}y = 3xe^{\int \frac{{2}}{{x}} dx}$$
- Simplify the left-hand side using the product rule of differentiation.
- Integrate both sides of the equation:
$$\int \frac{{d}}{{dx}}\left(ye^{\int \frac{{2}}{{x}} dx}\right) dx= \int 3xe^{\int \frac{{2}}{{x}} dx}dx$$
- Apply the fundamental theorem of calculus to evaluate the integrals.
- Solve the integral on the left-hand side:
$$ye^{\int \frac{{2}}{{x}} dx} = \int 3xe^{\int \frac{{2}}{{x}} dx}dx + C$$
- Here, C is the constant of integration.
- Divide both sides of the equation by the integrating factor:
$$y = \frac{{1}}{{e^{\int \frac{{2}}{{x}} dx}}} \left(\int 3xe^{\int \frac{{2}}{{x}} dx}dx + C\right)$$
- Simplify the exponential term.
- Evaluate the integral on the right-hand side:
$$y = \frac{{1}}{{e^{\int \frac{{2}}{{x}} dx}}} \left(\int 3x \cdot x^2 dx + C\right)$$
- Simplify the multiplication.
- Solve the integral on the right-hand side:
$$y = \frac{{1}}{{e^{\int \frac{{2}}{{x}} dx}}} \left(x^4 + C\right)$$
- Substitute the value of the integral back into the equation.
- Final Solution:
$$y = \frac{{1}}{{e^{\int \frac{{2}}{{x}} dx}}} \left(x^4 + C\right)$$
- This is the general solution to the given differential equation.
- Now, let’s consider an initial value problem to find the particular solution to the differential equation.
- An initial value problem involves finding the solution that satisfies certain conditions at a specific point.
- For example, let’s say we have the following initial condition:
$$y(1) = 5$$
- We can substitute this value into the general solution to find the particular solution.
- Substituting the initial condition into the general solution:
$$5 = \frac{{1}}{{e^{\int \frac{{2}}{{x}} dx}}} \left(1^4 + C\right)$$
$$5 = \frac{{1}}{{e^{\int \frac{{2}}{{x}} dx}}} (1 + C)$$