Solved Exercises on Linear First-Order Equations in Differential Equations

Master linear first-order equations: standard form, integrating factor method, and applications through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Basic linear equation
Exercise 1
Solve the linear first-order differential equation:
\(\frac{dy}{dx} + 2y = 4e^{-x}\)
Definition:

Linear first-order equation: A differential equation of the form \(\frac{dy}{dx} + P(x)y = Q(x)\) where \(P(x)\) and \(Q(x)\) are functions of \(x\).

Integrating factor method:
  1. Write the equation in standard form: \(\frac{dy}{dx} + P(x)y = Q(x)\)
  2. Find the integrating factor: \(\mu(x) = e^{\int P(x)dx}\)
  3. Multiply both sides of the equation by \(\mu(x)\)
  4. The left side becomes the derivative of \(\mu(x)y\): \(\frac{d}{dx}[\mu(x)y] = \mu(x)Q(x)\)
  5. Integrate both sides to find \(y\)
  6. Solve for \(y\) by dividing by \(\mu(x)\)
Standard Form
\(\frac{dy}{dx} + 2y = 4e^{-x}\)
Identify P(x)
\(P(x) = 2\)
Integrating Factor
\(\mu(x) = e^{\int 2 dx} = e^{2x}\)
Step 1: Identify coefficients

The equation is already in standard form: \(\frac{dy}{dx} + P(x)y = Q(x)\)

Where \(P(x) = 2\) and \(Q(x) = 4e^{-x}\)

Step 2: Calculate the integrating factor

\(\mu(x) = e^{\int P(x)dx} = e^{\int 2 dx} = e^{2x}\)

Step 3: Multiply equation by integrating factor

\(e^{2x}\frac{dy}{dx} + e^{2x} \cdot 2y = e^{2x} \cdot 4e^{-x}\)

\(e^{2x}\frac{dy}{dx} + 2e^{2x}y = 4e^{x}\)

Step 4: Recognize the derivative pattern

The left side is the derivative of \([e^{2x}y]\):

\(\frac{d}{dx}[e^{2x}y] = e^{2x}\frac{dy}{dx} + 2e^{2x}y\)

So: \(\frac{d}{dx}[e^{2x}y] = 4e^{x}\)

Step 5: Integrate both sides

\(\int \frac{d}{dx}[e^{2x}y] dx = \int 4e^{x} dx\)

\(e^{2x}y = 4e^{x} + C\)

Step 6: Solve for y

\(y = \frac{4e^{x} + C}{e^{2x}}\)

\(y = 4e^{x-2x} + Ce^{-2x}\)

\(y = 4e^{-x} + Ce^{-2x}\)

\(y = 4e^{-x} + Ce^{-2x}\) where C is an arbitrary constant
Final answer:

\(y = 4e^{-x} + Ce^{-2x}\) where \(C\) is an arbitrary constant

Applied rules:

• Integrating factor: \(\mu(x) = e^{\int P(x)dx}\) makes the left side a perfect derivative

• Product rule: \(\frac{d}{dx}[\mu(x)y] = \mu'(x)y + \mu(x)\frac{dy}{dx}\)

• Integration: \(\int e^{ax}dx = \frac{1}{a}e^{ax} + C\)

2 Linear equation with variable coefficients
Exercise 2
Solve the linear first-order differential equation:
\(\frac{dy}{dx} + \frac{1}{x}y = x^2\) for \(x > 0\)
Definition:

Linear equation with variable coefficients: When \(P(x)\) and/or \(Q(x)\) are non-constant functions, requiring careful integration.

Standard Form
\(\frac{dy}{dx} + \frac{1}{x}y = x^2\)
Identify P(x)
\(P(x) = \frac{1}{x}\)
Integrating Factor
\(\mu(x) = e^{\int \frac{1}{x} dx} = e^{\ln x} = x\)
Step 1: Write in standard form

The equation is already in standard form: \(\frac{dy}{dx} + P(x)y = Q(x)\)

Where \(P(x) = \frac{1}{x}\) and \(Q(x) = x^2\)

Step 2: Calculate the integrating factor

\(\mu(x) = e^{\int P(x)dx} = e^{\int \frac{1}{x} dx} = e^{\ln x} = x\)

Note: Since \(x > 0\), we have \(e^{\ln x} = x\) (not \(|x|\))

Step 3: Multiply by integrating factor

\(x\frac{dy}{dx} + x \cdot \frac{1}{x}y = x \cdot x^2\)

\(x\frac{dy}{dx} + y = x^3\)

Step 4: Recognize the derivative pattern

The left side is the derivative of \([xy]\):

\(\frac{d}{dx}[xy] = x\frac{dy}{dx} + y\) (using product rule)

So: \(\frac{d}{dx}[xy] = x^3\)

Step 5: Integrate both sides

\(\int \frac{d}{dx}[xy] dx = \int x^3 dx\)

\(xy = \frac{x^4}{4} + C\)

Step 6: Solve for y

\(y = \frac{\frac{x^4}{4} + C}{x}\)

\(y = \frac{x^4}{4x} + \frac{C}{x}\)

\(y = \frac{x^3}{4} + \frac{C}{x}\)

\(y = \frac{x^3}{4} + \frac{C}{x}\) where C is an arbitrary constant
Final answer:

\(y = \frac{x^3}{4} + \frac{C}{x}\) where \(C\) is an arbitrary constant and \(x > 0\)

Applied rules:

• Logarithmic integration: \(\int \frac{1}{x}dx = \ln|x| + C\)

• Exponential property: \(e^{\ln x} = x\) for \(x > 0\)

• Power rule: \(\int x^n dx = \frac{x^{n+1}}{n+1} + C\)

3 Linear equation with initial condition
Exercise 3
Solve the initial value problem:
\(\frac{dy}{dx} + 3y = 6\cos(2x)\), with \(y(0) = 1\)
Definition:

Initial value problem: A differential equation with specified initial conditions that determines the value of the arbitrary constant in the general solution.

Standard Form
\(\frac{dy}{dx} + 3y = 6\cos(2x)\)
Integrating Factor
\(\mu(x) = e^{\int 3 dx} = e^{3x}\)
General Solution
\(y = e^{-3x}\int 6e^{3x}\cos(2x)dx\)
Step 1: Identify coefficients

Standard form: \(\frac{dy}{dx} + P(x)y = Q(x)\)

Where \(P(x) = 3\) and \(Q(x) = 6\cos(2x)\)

Step 2: Calculate the integrating factor

\(\mu(x) = e^{\int P(x)dx} = e^{\int 3 dx} = e^{3x}\)

Step 3: Multiply by integrating factor

\(e^{3x}\frac{dy}{dx} + 3e^{3x}y = 6e^{3x}\cos(2x)\)

\(\frac{d}{dx}[e^{3x}y] = 6e^{3x}\cos(2x)\)

Step 4: Integrate both sides

To solve \(\int 6e^{3x}\cos(2x)dx\), we use integration by parts twice or the formula:

\(\int e^{ax}\cos(bx)dx = \frac{e^{ax}}{a^2+b^2}[a\cos(bx) + b\sin(bx)] + C\)

With \(a = 3\) and \(b = 2\):

\(\int e^{3x}\cos(2x)dx = \frac{e^{3x}}{9+4}[3\cos(2x) + 2\sin(2x)] = \frac{e^{3x}}{13}[3\cos(2x) + 2\sin(2x)]\)

Therefore: \(e^{3x}y = 6 \cdot \frac{e^{3x}}{13}[3\cos(2x) + 2\sin(2x)] + C\)

\(e^{3x}y = \frac{6e^{3x}}{13}[3\cos(2x) + 2\sin(2x)] + C\)

Step 5: Solve for y

\(y = \frac{6}{13}[3\cos(2x) + 2\sin(2x)] + Ce^{-3x}\)

\(y = \frac{18\cos(2x) + 12\sin(2x)}{13} + Ce^{-3x}\)

Step 6: Apply initial condition

Using \(y(0) = 1\):

\(1 = \frac{18\cos(0) + 12\sin(0)}{13} + Ce^{0}\)

\(1 = \frac{18 \cdot 1 + 12 \cdot 0}{13} + C\)

\(1 = \frac{18}{13} + C\)

\(C = 1 - \frac{18}{13} = \frac{13-18}{13} = -\frac{5}{13}\)

\(y = \frac{18\cos(2x) + 12\sin(2x)}{13} - \frac{5}{13}e^{-3x}\)
Final answer:

\(y = \frac{18\cos(2x) + 12\sin(2x)}{13} - \frac{5}{13}e^{-3x}\)

Applied rules:

• Trigonometric integration: \(\int e^{ax}\cos(bx)dx = \frac{e^{ax}}{a^2+b^2}[a\cos(bx) + b\sin(bx)]\)

• Initial conditions: Substitute known values to determine constants

• Trigonometric values: \(\cos(0) = 1\), \(\sin(0) = 0\)

Linear First-Order Equations: Summary and Properties
\(\frac{dy}{dx} + P(x)y = Q(x)\)
Standard Form of Linear First-Order Equation
Key definitions:

Linear equation: A first-order differential equation that is linear in the dependent variable \(y\) and its derivative \(\frac{dy}{dx}\).

Integrating factor: A function \(\mu(x) = e^{\int P(x)dx}\) that transforms the equation into an exact derivative.

Homogeneous equation: When \(Q(x) = 0\), the equation becomes \(\frac{dy}{dx} + P(x)y = 0\).

Non-homogeneous equation: When \(Q(x) \neq 0\), the equation has a forcing term.

Complete methodology:
  1. Standard form: Write as \(\frac{dy}{dx} + P(x)y = Q(x)\)
  2. Integrating factor: Calculate \(\mu(x) = e^{\int P(x)dx}\)
  3. Multiplication: Multiply entire equation by \(\mu(x)\)
  4. Pattern recognition: Left side becomes \(\frac{d}{dx}[\mu(x)y]\)
  5. Integration: Integrate both sides
  6. Solution: Solve for \(y\) by dividing by \(\mu(x)\)
  7. Initial conditions: If given, substitute to find constants
Tip 1: Always verify the equation is in standard form before finding the integrating factor.
Tip 2: The integrating factor always has the form \(e^{\int P(x)dx}\).
Tip 3: When integrating the right side, you may need integration by parts or trigonometric formulas.
Tip 4: The homogeneous solution is always of the form \(y_h = Ce^{-\int P(x)dx}\).
Common errors: Forgetting to multiply the right side by the integrating factor, incorrect calculation of the integrating factor, algebraic mistakes when solving for y.
Exam preparation: Practice recognizing standard form, master integration techniques for various Q(x) functions, and work with initial value problems.
Essential formulas to know:

• Standard form: \(\frac{dy}{dx} + P(x)y = Q(x)\)

• Integrating factor: \(\mu(x) = e^{\int P(x)dx}\)

• Product rule: \(\frac{d}{dx}[uv] = u'v + uv'\)

• Trig integration: \(\int e^{ax}\cos(bx)dx = \frac{e^{ax}}{a^2+b^2}[a\cos(bx) + b\sin(bx)]\)

• Trig integration: \(\int e^{ax}\sin(bx)dx = \frac{e^{ax}}{a^2+b^2}[a\sin(bx) - b\cos(bx)]\)

Solution: Exercises 4 to 5
4 Linear equation with exponential input
Exercise 4
Solve the linear first-order differential equation:
\(\frac{dy}{dx} - 2y = e^{3x}\)
Definition:

Linear equation with exponential forcing: An equation of the form \(\frac{dy}{dx} + P(x)y = Q(x)\) where \(Q(x)\) is an exponential function.

Standard Form
\(\frac{dy}{dx} + (-2)y = e^{3x}\)
Identify P(x)
\(P(x) = -2\)
Integrating Factor
\(\mu(x) = e^{\int -2 dx} = e^{-2x}\)
Step 1: Write in standard form

\(\frac{dy}{dx} + P(x)y = Q(x)\)

Where \(P(x) = -2\) and \(Q(x) = e^{3x}\)

Step 2: Calculate the integrating factor

\(\mu(x) = e^{\int P(x)dx} = e^{\int -2 dx} = e^{-2x}\)

Step 3: Multiply by integrating factor

\(e^{-2x}\frac{dy}{dx} + e^{-2x}(-2)y = e^{-2x} \cdot e^{3x}\)

\(e^{-2x}\frac{dy}{dx} - 2e^{-2x}y = e^{x}\)

Step 4: Recognize the derivative pattern

The left side is the derivative of \([e^{-2x}y]\):

\(\frac{d}{dx}[e^{-2x}y] = e^{-2x}\frac{dy}{dx} - 2e^{-2x}y\)

So: \(\frac{d}{dx}[e^{-2x}y] = e^{x}\)

Step 5: Integrate both sides

\(\int \frac{d}{dx}[e^{-2x}y] dx = \int e^{x} dx\)

\(e^{-2x}y = e^{x} + C\)

Step 6: Solve for y

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

\(y = e^{x} \cdot e^{2x} + C \cdot e^{2x}\)

\(y = e^{3x} + Ce^{2x}\)

\(y = e^{3x} + Ce^{2x}\) where C is an arbitrary constant
Final answer:

\(y = e^{3x} + Ce^{2x}\) where \(C\) is an arbitrary constant

Applied rules:

• Exponential multiplication: \(\frac{e^a}{e^b} = e^{a-b}\)

• Integration: \(\int e^{ax}dx = \frac{1}{a}e^{ax} + C\)

• Sign handling: Be careful with negative coefficients in P(x)

5 Linear equation with rational coefficients
Exercise 5
Solve the linear first-order differential equation:
\(\frac{dy}{dx} + \frac{2}{x}y = \frac{1}{x^2}\) for \(x > 0\)
Definition:

Linear equation with rational coefficients: An equation where \(P(x)\) and \(Q(x)\) are rational functions (ratios of polynomials).

Standard Form
\(\frac{dy}{dx} + \frac{2}{x}y = \frac{1}{x^2}\)
Integrating Factor
\(\mu(x) = e^{\int \frac{2}{x} dx} = e^{2\ln x} = e^{\ln x^2} = x^2\)
After Multiplication
\(x^2\frac{dy}{dx} + 2xy = 1\)
Step 1: Identify coefficients

Standard form: \(\frac{dy}{dx} + P(x)y = Q(x)\)

Where \(P(x) = \frac{2}{x}\) and \(Q(x) = \frac{1}{x^2}\)

Step 2: Calculate the integrating factor

\(\mu(x) = e^{\int P(x)dx} = e^{\int \frac{2}{x} dx} = e^{2\ln x} = e^{\ln x^2} = x^2\)

Note: Since \(x > 0\), we have \(e^{2\ln x} = e^{\ln x^2} = x^2\)

Step 3: Multiply by integrating factor

\(x^2\frac{dy}{dx} + x^2 \cdot \frac{2}{x}y = x^2 \cdot \frac{1}{x^2}\)

\(x^2\frac{dy}{dx} + 2xy = 1\)

Step 4: Recognize the derivative pattern

The left side is the derivative of \([x^2y]\):

\(\frac{d}{dx}[x^2y] = x^2\frac{dy}{dx} + 2x \cdot y\) (using product rule)

So: \(\frac{d}{dx}[x^2y] = 1\)

Step 5: Integrate both sides

\(\int \frac{d}{dx}[x^2y] dx = \int 1 dx\)

\(x^2y = x + C\)

Step 6: Solve for y

\(y = \frac{x + C}{x^2}\)

\(y = \frac{x}{x^2} + \frac{C}{x^2}\)

\(y = \frac{1}{x} + \frac{C}{x^2}\)

\(y = \frac{1}{x} + \frac{C}{x^2}\) where C is an arbitrary constant
Final answer:

\(y = \frac{1}{x} + \frac{C}{x^2}\) where \(C\) is an arbitrary constant and \(x > 0\)

Applied rules:

• Logarithmic property: \(ae^{\ln x} = ax\) and \(e^{a\ln x} = x^a\)

• Power rule: \(\int x^n dx = \frac{x^{n+1}}{n+1} + C\)

• Domain restriction: Specify \(x > 0\) when dealing with \(\ln x\)

Advanced Properties and Applications of Linear First-Order Equations
\(\frac{dy}{dx} + P(x)y = Q(x)\)
Linear First-Order Differential Equation
Advanced definitions:

Superposition principle: The general solution is \(y = y_h + y_p\) where \(y_h\) is the homogeneous solution and \(y_p\) is a particular solution.

Existence and uniqueness: If \(P(x)\) and \(Q(x)\) are continuous on an interval containing \(x_0\), then the IVP has a unique solution.

Stability properties: Solutions depend continuously on initial conditions and coefficients.

Alternative methodologies:
  1. Integrating factor method: Standard approach using \(\mu(x) = e^{\int P(x)dx}\)
  2. Variation of parameters: For non-homogeneous equations, assume \(y = u(x)e^{-\int P(x)dx}\)
  3. Undetermined coefficients: For specific forms of \(Q(x)\) like polynomials, exponentials, or trigonometric functions
  4. Laplace transform: For equations with constant coefficients and specific initial conditions
Tip 1: For equations with constant coefficients, the homogeneous solution decays exponentially if P > 0.
Tip 2: The particular solution often has the same form as the forcing function Q(x).
Tip 3: When Q(x) is a combination of functions, use the principle of superposition.
Tip 4: Check your solution by substituting back into the original equation.
Physical applications: RC circuits, population models, cooling/heating processes, mixing problems, and radioactive decay.
Mathematical significance: These equations are the simplest non-trivial class that can always be solved explicitly using elementary functions.
Advanced formulas and properties:

• General solution: \(y = e^{-\int P(x)dx}\left[\int Q(x)e^{\int P(x)dx}dx + C\right]\)

• Homogeneous solution: \(y_h = Ce^{-\int P(x)dx}\)

• If \(P(x) = a\) (constant), then \(\mu(x) = e^{ax}\)

• For \(Q(x) = ke^{bx}\), particular solution has form \(Ae^{bx}\) if \(b \neq -a\)

• For \(Q(x) = k\cos(cx)\) or \(k\sin(cx)\), particular solution combines both sine and cosine terms

Applications: Linear Equations in Physics and Engineering
Application: RC Circuit Analysis
The voltage across a capacitor in an RC circuit follows:
\(RC\frac{dV_c}{dt} + V_c = V_s(t)\) where R is resistance, C is capacitance, and \(V_s(t)\) is source voltage.
This is a linear first-order equation modeling charge accumulation.

Analysis: The solution shows exponential approach to steady state with time constant τ = RC.

  • Charging: \(V_c(t) = V_s(1 - e^{-t/RC})\)
  • Discharging: \(V_c(t) = V_0e^{-t/RC}\)
  • Time constant τ = RC determines charging speed

Questions & Answers

Question: How do I recognize if an equation is linear? Sometimes equations look nonlinear but can be transformed into linear form.

Answer: A first-order differential equation is linear if it can be written in the form \(\frac{dy}{dx} + P(x)y = Q(x)\) where:

  1. \(\frac{dy}{dx}\) appears only to the first power
  2. \(y\) appears only to the first power (no \(y^2\), \(\sqrt{y}\), \(\sin(y)\), etc.)
  3. No products of \(y\) and \(\frac{dy}{dx}\) (like \(y\frac{dy}{dx}\))
  4. Coefficients of \(y\) and \(\frac{dy}{dx}\) depend only on \(x\) (not on \(y\))

Examples of linear equations:

  • \(\frac{dy}{dx} + 3xy = \sin(x)\) ✓
  • \(\frac{dy}{dx} - e^x y = x^2\) ✓
  • \(\frac{dy}{dx} + y^2 = x\) ✗ (nonlinear in \(y\))
  • \(y\frac{dy}{dx} + x = 0\) ✗ (product of \(y\) and \(\frac{dy}{dx}\))

Important note: Some equations that initially appear nonlinear can be made linear through substitution. For example, Bernoulli equations \(\frac{dy}{dx} + P(x)y = Q(x)y^n\) can be transformed into linear equations by substituting \(v = y^{1-n}\).

Always try to rearrange into standard form to confirm linearity.

Question: What is the physical intuition behind the integrating factor? Why does it work?

Answer: The integrating factor has a beautiful mathematical and physical interpretation:

  1. Mathematical perspective: The integrating factor \(\mu(x) = e^{\int P(x)dx}\) is designed so that when you multiply the equation \(\frac{dy}{dx} + P(x)y = Q(x)\) by \(\mu(x)\), the left side becomes the derivative of \(\mu(x)y\): \(\mu(x)\frac{dy}{dx} + \mu(x)P(x)y = \frac{d}{dx}[\mu(x)y]\) This uses the product rule: \(\frac{d}{dx}[\mu(x)y] = \mu'(x)y + \mu(x)\frac{dy}{dx}\)
  2. Physical interpretation: The integrating factor acts like a "weighting function" that accounts for the cumulative effect of the coefficient \(P(x)\) over time. It's as if we're measuring \(y\) in a coordinate system that changes with \(x\).
  3. Why it works: The choice \(\mu(x) = e^{\int P(x)dx}\) ensures that \(\mu'(x) = P(x)\mu(x)\), which creates the perfect match needed for the product rule pattern.

Analogy: Think of it like converting measurements to a different unit system where the equation becomes simpler. Just as converting Celsius to Kelvin makes some physics calculations easier, the integrating factor converts the differential equation to a form where direct integration is possible.

The integrating factor essentially "undoes" the effect of the \(P(x)y\) term, allowing us to integrate directly.

Question: When integrating the right side after multiplying by the integrating factor, how do I handle complex integrals like \(\int e^{3x}\cos(2x)dx\)?

Answer: For integrals of the form \(\int e^{ax}\cos(bx)dx\) or \(\int e^{ax}\sin(bx)dx\), you have several approaches:

  1. Memorize the formulas:
    • \(\int e^{ax}\cos(bx)dx = \frac{e^{ax}}{a^2+b^2}[a\cos(bx) + b\sin(bx)] + C\)
    • \(\int e^{ax}\sin(bx)dx = \frac{e^{ax}}{a^2+b^2}[a\sin(bx) - b\cos(bx)] + C\)
  2. Integration by parts (twice): Let \(u = e^{ax}\) and \(dv = \cos(bx)dx\), then apply integration by parts twice to get an equation you can solve for the integral.
  3. Complex exponential method: Use Euler's formula \(e^{ibx} = \cos(bx) + i\sin(bx)\) and integrate \(\int e^{ax}e^{ibx}dx = \int e^{(a+ib)x}dx\), then take real or imaginary parts.
  4. Tabular integration: For repeated integration by parts, use the tabular method with alternating signs.

For \(\int e^{3x}\cos(2x)dx\): Using the formula with \(a = 3\) and \(b = 2\): \(\int e^{3x}\cos(2x)dx = \frac{e^{3x}}{9+4}[3\cos(2x) + 2\sin(2x)] + C = \frac{e^{3x}}{13}[3\cos(2x) + 2\sin(2x)] + C\)

Practice tip: These formulas appear frequently in linear equations with sinusoidal forcing, so it's worth memorizing them. The key insight is that the integral has the same exponential factor multiplied by a linear combination of the original trigonometric functions.

Question: What are the most common mistakes students make when solving linear first-order equations, and how can I avoid them?

Answer: Here are the most frequent errors and how to prevent them:

  1. Mistake 1: Incorrect standard form
    • Error: Not writing the equation as \(\frac{dy}{dx} + P(x)y = Q(x)\) with the coefficient of \(\frac{dy}{dx}\) equal to 1
    • Correct: Divide by the coefficient of \(\frac{dy}{dx}\) if necessary
  2. Mistake 2: Wrong integrating factor
    • Error: Using \(\int P(x)dx\) instead of \(e^{\int P(x)dx}\)
    • Correct: Remember it's the exponential of the integral
  3. Mistake 3: Forgetting to multiply the right side
  4. Error: Only multiplying the left side by the integrating factor
  5. Correct: Multiply the entire equation by \(\mu(x)\)
  6. Mistake 4: Algebraic errors
    • Error: Mistakes when solving for \(y\) after integration
    • Correct: Carefully divide by the integrating factor and simplify
  7. Mistake 5: Sign errors
    • Error: Getting wrong signs in \(P(x)\) or in the integration
    • Correct: Pay close attention to signs throughout the process

Verification technique: Always substitute your solution back into the original equation to check it's correct.

Process tip: Write out each step clearly and double-check the integrating factor calculation - it's critical for the entire solution.