Solved Exercises on Differential Equations Introduction

Master differential equations: classification, solving methods, and applications through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 First-order linear equation
Exercise 1
Solve the differential equation:
\(\frac{dy}{dx} = 3y\)
Definition:

First-order linear differential equation: An equation of the form \(\frac{dy}{dx} = f(x,y)\) where the highest derivative is first order.

Solution method:
  1. Recognize this as a separable differential equation
  2. Separate variables: move all y terms to one side, all x terms to the other
  3. Integrate both sides
  4. Solve for y in terms of x
Original equation
\(\frac{dy}{dx} = 3y\)
Separation
\(\frac{1}{y} dy = 3 dx\)
Integration
\(\ln|y| = 3x + C\)
Step 1: Separate variables

\(\frac{dy}{dx} = 3y\)

\(\frac{dy}{y} = 3 dx\)

Step 2: Integrate both sides

\(\int \frac{1}{y} dy = \int 3 dx\)

\(\ln|y| = 3x + C_1\)

Step 3: Solve for y

\(|y| = e^{3x + C_1}\)

\(|y| = e^{C_1} \cdot e^{3x}\)

Let \(C = e^{C_1}\) (where \(C > 0\))

\(y = \pm Ce^{3x}\)

Since \(C\) can be any real number, we can write: \(y = Ce^{3x}\)

\(y = Ce^{3x}\)
Final answer:

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

Applied rules:

• Separation of variables: Move dependent and independent variables to opposite sides

• Integration: \(\int \frac{1}{y} dy = \ln|y| + C\)

• Exponential property: \(e^{a+b} = e^a \cdot e^b\)

Tip: Always include the absolute value when integrating \(\frac{1}{y}\), then absorb the sign into the constant.
Caution: Don't forget the constant of integration on both sides (though it's often combined into one).
2 Initial value problem
Exercise 2
Solve the initial value problem:
\(\frac{dy}{dx} = 2xy\), with \(y(0) = 3\)
Definition:

Initial value problem (IVP): A differential equation with specified initial conditions that allow determining the particular solution.

Original IVP
\(\frac{dy}{dx} = 2xy\), \(y(0) = 3\)
General solution
\(y = Ce^{x^2}\)
Particular solution
\(y = 3e^{x^2}\)
Step 1: Separate variables

\(\frac{dy}{dx} = 2xy\)

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

Step 2: Integrate both sides

\(\int \frac{1}{y} dy = \int 2x dx\)

\(\ln|y| = x^2 + C_1\)

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

\(y = Ce^{x^2}\) (where \(C = \pm e^{C_1}\))

Step 3: Apply initial condition

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

\(3 = Ce^{0^2} = Ce^0 = C \cdot 1 = C\)

So \(C = 3\)

Step 4: Write the particular solution

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

\(y = 3e^{x^2}\)
Final answer:

\(y = 3e^{x^2}\) is the particular solution satisfying the initial condition

Applied rules:

• Separation of variables: \(\frac{dy}{y} = 2x dx\)

• Integration: \(\int 2x dx = x^2 + C\)

• Initial condition: Use given condition to find the specific value of the constant

Tip: Always verify your particular solution by substituting back into the original equation and checking the initial condition.
Verification: \(\frac{dy}{dx} = 3 \cdot 2x \cdot e^{x^2} = 6xe^{x^2} = 2x \cdot 3e^{x^2} = 2xy\) ✓

3 Order and degree identification
Exercise 3
Classify the following differential equations:
a) \(\frac{d^2y}{dx^2} + 3\frac{dy}{dx} + 2y = 0\)
b) \(\left(\frac{dy}{dx}\right)^2 + y^3 = \sin(x)\)
c) \(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0\)
Definition:

Order: The highest derivative appearing in the equation.
Degree: The power of the highest derivative when the equation is in polynomial form.
ODE vs PDE: ODE has one independent variable, PDE has multiple.

Equation a
Order: 2, Degree: 1, Type: ODE
Equation b
Order: 1, Degree: 2, Type: ODE
Equation c
Order: 2, Degree: 1, Type: PDE
Step 1: Analyze equation (a)

\(\frac{d^2y}{dx^2} + 3\frac{dy}{dx} + 2y = 0\)

Highest derivative: \(\frac{d^2y}{dx^2}\) (second derivative)

Order: 2

Degree: 1 (the second derivative is raised to the first power)

Type: ODE (only one independent variable x)

Step 2: Analyze equation (b)

\(\left(\frac{dy}{dx}\right)^2 + y^3 = \sin(x)\)

Highest derivative: \(\frac{dy}{dx}\) (first derivative)

Order: 1

Degree: 2 (the first derivative is squared)

Type: ODE (only one independent variable x)

Step 3: Analyze equation (c)

\(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0\)

Highest derivatives: \(\frac{\partial^2 u}{\partial x^2}\) and \(\frac{\partial^2 u}{\partial y^2}\) (second partial derivatives)

Order: 2

Degree: 1 (the second derivatives are raised to the first power)

Type: PDE (two independent variables x and y)

Step 4: Summary of classifications

a) Second-order linear homogeneous ODE

b) First-order nonlinear ODE (due to the squared derivative)

c) Second-order linear homogeneous PDE (Laplace's equation)

a) Order: 2, Degree: 1, Type: ODE
b) Order: 1, Degree: 2, Type: ODE
c) Order: 2, Degree: 1, Type: PDE
Final answer:

a) Second-order linear homogeneous ODE
b) First-order nonlinear ODE
c) Second-order linear homogeneous PDE (Laplace's equation)

Applied rules:

• Order determination: Identify the highest derivative

• Degree determination: Look at the power of the highest derivative

• ODE/PDE classification: Count the number of independent variables

Tip: The degree is only defined when the equation is polynomial in its derivatives.
Caution: Some equations may not have a well-defined degree if they contain non-polynomial terms.
Differential Equations: Complete Guide
\(\frac{dy}{dx} = f(x,y)\)
General First-Order ODE
Linear ODE
\(\frac{dy}{dx} + P(x)y = Q(x)\)
Standard linear form
Separable ODE
\(\frac{dy}{dx} = g(x)h(y)\)
Variables can be separated
Homogeneous ODE
\(\frac{dy}{dx} = F\left(\frac{y}{x}\right)\)
Function of y/x only
Key definitions:

Differential equation: An equation involving derivatives of an unknown function.

Ordinary differential equation (ODE): Contains only ordinary derivatives with respect to a single variable.

Partial differential equation (PDE): Contains partial derivatives with respect to multiple variables.

Order: The highest derivative in the equation.

Degree: The power of the highest derivative when the equation is polynomial.

Solution methodologies:
  1. Separation of variables: For equations of the form \(\frac{dy}{dx} = g(x)h(y)\)
  2. Integrating factor: For linear equations of the form \(\frac{dy}{dx} + P(x)y = Q(x)\)
  3. Exact equations: When \(\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}\) in \(M(x,y)dx + N(x,y)dy = 0\)
  4. Homogeneous substitution: For equations of the form \(\frac{dy}{dx} = F(y/x)\)
  5. Initial/boundary conditions: To find particular solutions
Tip 1: Always identify the type of differential equation first to select the appropriate solution method.
Tip 2: Verify your solution by substituting it back into the original equation.
Tip 3: For initial value problems, use the condition to find the specific value of the arbitrary constant.
Tip 4: Be careful with absolute values when integrating \(\frac{1}{y}\) and combine constants appropriately.
Common errors: Forgetting to separate variables properly, misapplying integration rules, ignoring initial conditions.
Applications: Physics (motion, heat transfer), biology (population growth), economics (compound interest), engineering (control systems).
Essential formulas:

• Separation: \(\frac{dy}{dx} = g(x)h(y) \Rightarrow \int \frac{dy}{h(y)} = \int g(x) dx\)

• Linear ODE: \(\frac{dy}{dx} + P(x)y = Q(x) \Rightarrow y = e^{-\int P(x)dx}\int Q(x)e^{\int P(x)dx}dx\)

• Exact equation: \(M(x,y)dx + N(x,y)dy = 0\) is exact if \(\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}\)

• Homogeneous: Substitution \(v = y/x\) transforms to separable equation

Solution: Exercises 4 to 5
4 Population growth model
Exercise 4
A population grows at a rate proportional to its size. If the initial population is 1000 and doubles in 5 years, find the population at any time t.
Definition:

Exponential growth model: The rate of change of a quantity is proportional to the quantity itself, described by \(\frac{dP}{dt} = kP\).

Model equation
\(\frac{dP}{dt} = kP\)
General solution
\(P(t) = P_0 e^{kt}\)
Particular solution
\(P(t) = 1000e^{\frac{\ln(2)}{5}t}\)
Step 1: Set up the differential equation

"Rate of growth is proportional to population size" means:

\(\frac{dP}{dt} = kP\)

where \(P\) is the population, \(t\) is time, and \(k\) is the proportionality constant.

Step 2: Solve the differential equation

This is a separable equation:

\(\frac{dP}{P} = k dt\)

\(\int \frac{dP}{P} = \int k dt\)

\(\ln|P| = kt + C\)

\(|P| = e^{kt+C} = e^C e^{kt}\)

\(P(t) = P_0 e^{kt}\)

where \(P_0 = \pm e^C\) is determined by initial conditions.

Step 3: Apply initial conditions

Given: \(P(0) = 1000\)

\(1000 = P_0 e^{k \cdot 0} = P_0 \cdot 1\)

So \(P_0 = 1000\)

Step 4: Find the growth constant k

Given: Population doubles in 5 years, so \(P(5) = 2000\)

\(2000 = 1000e^{5k}\)

\(2 = e^{5k}\)

\(\ln(2) = 5k\)

\(k = \frac{\ln(2)}{5}\)

Step 5: Write the final solution

\(P(t) = 1000e^{\frac{\ln(2)}{5}t}\)

This can also be written as: \(P(t) = 1000 \cdot 2^{t/5}\)

\(P(t) = 1000e^{\frac{\ln(2)}{5}t}\)
Final answer:

The population at any time t is \(P(t) = 1000e^{\frac{\ln(2)}{5}t}\) or equivalently \(P(t) = 1000 \cdot 2^{t/5}\)

Applied rules:

• Exponential growth model: \(\frac{dP}{dt} = kP \Rightarrow P(t) = P_0e^{kt}\)

• Initial value problem: Use given conditions to determine constants

• Logarithmic properties: \(\ln(e^x) = x\) and \(e^{\ln(x)} = x\)

Tip: Many real-world phenomena follow exponential models: population growth, radioactive decay, compound interest.
Limitation: Pure exponential growth models are idealized and don't account for resource limitations.
5 Newton's law of cooling
Exercise 5
A cup of coffee initially at 90°C cools in a room at 20°C. After 10 minutes, the temperature is 70°C. Find the temperature at any time t and how long it takes to reach 40°C.
Definition:

Newton's law of cooling: The rate of temperature change of an object is proportional to the difference between its temperature and the ambient temperature.

Model equation
\(\frac{dT}{dt} = -k(T-T_a)\)
General solution
\(T(t) = T_a + (T_0-T_a)e^{-kt}\)
Particular solution
\(T(t) = 20 + 70e^{-\frac{\ln(7/5)}{10}t}\)
Step 1: Set up the differential equation

Newton's law of cooling states:

\(\frac{dT}{dt} = -k(T-T_a)\)

where \(T\) is the object's temperature, \(T_a\) is ambient temperature (20°C), and \(k\) is a positive constant.

Initial conditions: \(T(0) = 90°C\), \(T(10) = 70°C\)

Step 2: Solve the differential equation

This is a separable equation:

\(\frac{dT}{T-T_a} = -k dt\)

\(\int \frac{dT}{T-T_a} = \int -k dt\)

\(\ln|T-T_a| = -kt + C\)

\(|T-T_a| = e^{-kt+C} = e^C e^{-kt}\)

\(T-T_a = Ae^{-kt}\) where \(A = \pm e^C\)

\(T(t) = T_a + Ae^{-kt}\)

Step 3: Apply the initial condition

At \(t = 0\), \(T(0) = 90°C\):

\(90 = 20 + Ae^{-k \cdot 0}\)

\(90 = 20 + A\)

\(A = 70\)

So \(T(t) = 20 + 70e^{-kt}\)

Step 4: Find the cooling constant k

At \(t = 10\), \(T(10) = 70°C\):

\(70 = 20 + 70e^{-10k}\)

\(50 = 70e^{-10k}\)

\(\frac{5}{7} = e^{-10k}\)

\(\ln\left(\frac{5}{7}\right) = -10k\)

\(k = -\frac{1}{10}\ln\left(\frac{5}{7}\right) = \frac{1}{10}\ln\left(\frac{7}{5}\right)\)

Step 5: Find when T(t) = 40°C

Set \(T(t) = 40\):

\(40 = 20 + 70e^{-\frac{\ln(7/5)}{10}t}\)

\(20 = 70e^{-\frac{\ln(7/5)}{10}t}\)

\(\frac{2}{7} = e^{-\frac{\ln(7/5)}{10}t}\)

\(\ln\left(\frac{2}{7}\right) = -\frac{\ln(7/5)}{10}t\)

\(t = \frac{10\ln(2/7)}{-\ln(7/5)} = \frac{10\ln(7/2)}{\ln(7/5)}\)

\(t \approx 27.7\) minutes

\(T(t) = 20 + 70e^{-\frac{\ln(7/5)}{10}t}\), reaches 40°C at ~27.7 minutes
Final answer:

The temperature at any time t is \(T(t) = 20 + 70e^{-\frac{\ln(7/5)}{10}t}\), and it reaches 40°C after approximately 27.7 minutes.

Applied rules:

• Newton's law of cooling: \(\frac{dT}{dt} = -k(T-T_a)\)

• Exponential decay: Solution is exponential approach to equilibrium

• Logarithmic manipulation: Used to solve for time and constants

Tip: The temperature approaches ambient temperature exponentially but never quite reaches it.
Real-world: Newton's law is an approximation that works well when temperature differences are moderate.
Comprehensive Summary: Differential Equations
\(\frac{dy}{dx} = f(x,y)\)
General Form of First-Order ODE
Key definitions:

Differential equation: An equation containing derivatives of an unknown function. It describes relationships between changing quantities.

Ordinary differential equation (ODE): Contains derivatives with respect to only one independent variable.

Partial differential equation (PDE): Contains partial derivatives with respect to multiple independent variables.

Order: The highest derivative appearing in the equation.

Degree: The power of the highest derivative when the equation is expressed as a polynomial in derivatives.

Linear ODE: An equation that is linear in the unknown function and its derivatives.

Nonlinear ODE: An equation that is not linear in the unknown function or its derivatives.

Solution methodologies:
  1. Separation of variables: For equations of the form \(\frac{dy}{dx} = g(x)h(y)\), rewrite as \(\frac{dy}{h(y)} = g(x)dx\) and integrate both sides.
  2. Integrating factor: For linear equations \(\frac{dy}{dx} + P(x)y = Q(x)\), multiply by \(\mu(x) = e^{\int P(x)dx}\) to make the left side a perfect derivative.
  3. Exact equations: For equations \(M(x,y)dx + N(x,y)dy = 0\), check if \(\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}\); if so, find potential function \(\psi(x,y)\) such that \(d\psi = Mdx + Ndy\).
  4. Homogeneous equations: For equations of the form \(\frac{dy}{dx} = F(y/x)\), substitute \(v = y/x\) to reduce to separable form.
  5. Substitution methods: Various substitutions can transform complex equations into simpler forms.
Tip 1: Always identify the type of differential equation first to select the appropriate solution method.
Tip 2: Verify your solution by substituting it back into the original equation.
Tip 3: For initial value problems, use the condition to find the specific value of the arbitrary constant.
Tip 4: Be careful with absolute values when integrating \(\frac{1}{y}\) and combine constants appropriately.
Tip 5: Remember that some differential equations have unique solutions only under certain conditions (Lipschitz condition).
Common errors: Forgetting to separate variables properly, misapplying integration rules, ignoring initial conditions, algebraic mistakes in constant manipulation.
Real-world applications: Physics (motion, waves, heat transfer), biology (population dynamics, epidemiology), chemistry (reaction rates), economics (growth models), engineering (control systems).
Essential formulas:

• Separation: \(\frac{dy}{dx} = g(x)h(y) \Rightarrow \int \frac{dy}{h(y)} = \int g(x) dx\)

• Linear ODE: \(\frac{dy}{dx} + P(x)y = Q(x) \Rightarrow y = e^{-\int P(x)dx}\int Q(x)e^{\int P(x)dx}dx\)

• Exact equation: \(M(x,y)dx + N(x,y)dy = 0\) is exact if \(\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}\)

• Exponential growth/decay: \(\frac{dP}{dt} = kP \Rightarrow P(t) = P_0e^{kt}\)

• Newton's law of cooling: \(\frac{dT}{dt} = -k(T-T_a) \Rightarrow T(t) = T_a + (T_0-T_a)e^{-kt}\)

Advanced Applications: Systems of Differential Equations
Example: Predator-Prey Model
The Lotka-Volterra equations describe predator-prey dynamics:
\(\frac{dx}{dt} = ax - bxy\) (Prey population x)
\(\frac{dy}{dt} = -cy + dxy\) (Predator population y)
Where a, b, c, d are positive constants.

Analysis: This system of coupled differential equations demonstrates oscillatory population dynamics:

  • Prey population grows when predators are scarce
  • Predator population increases when prey is abundant
  • As predators increase, prey decreases
  • As prey decreases, predators decrease due to lack of food
  • The cycle repeats, creating periodic oscillations

Questions & Answers

Question: I'm confused about the difference between the order and degree of a differential equation. Can you clarify with examples?

Answer: Great question! The order and degree are distinct characteristics:

Order: The highest derivative appearing in the equation.

Degree: The power of the highest derivative when the equation is expressed as a polynomial in its derivatives.

Examples:

  • \(\frac{d^2y}{dx^2} + 3\frac{dy}{dx} + 2y = 0\): Order 2, Degree 1 (highest derivative is second, raised to first power)
  • \(\left(\frac{d^3y}{dx^3}\right)^2 + \frac{dy}{dx} = x\): Order 3, Degree 2 (highest derivative is third, raised to second power)
  • \(\frac{dy}{dx} + \sin\left(\frac{dy}{dx}\right) = 0\): Order 1, No degree (not polynomial in derivatives)

Think of order as "how many derivatives" and degree as "what power of the highest derivative".

The degree is only defined when the equation is polynomial in its derivatives!

Question: How do I know which method to use when solving a differential equation? There seem to be so many different approaches.

Answer: The key is pattern recognition. Here's a systematic approach:

  1. Identify the type: Look for standard forms
  2. Separable: If \(\frac{dy}{dx} = g(x)h(y)\), use separation of variables
  3. Linear: If \(\frac{dy}{dx} + P(x)y = Q(x)\), use integrating factor
  4. Exact: If \(M(x,y)dx + N(x,y)dy = 0\) and \(\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}\), use exact equation method
  5. Homogeneous: If \(\frac{dy}{dx} = F(y/x)\), use substitution \(v = y/x\)

Start by trying to identify the simplest method that applies. If the equation doesn't fit a standard form, look for substitutions that might transform it into one.

Practice recognizing these patterns - it becomes intuitive with experience!

Question: Why do we need initial conditions in differential equations? Can't we just find the general solution?

Answer: Both the general solution and particular solutions serve important purposes:

General solution: Contains arbitrary constants and represents the entire family of solutions. It's useful for understanding the structure of all possible solutions.

Particular solution (with initial conditions): Represents the specific solution relevant to a real-world scenario where we know the state at a particular time.

For example, in physics, initial conditions represent the initial position and velocity of a moving object. Without these, we can't predict where the object will be at future times.

Initial conditions also ensure uniqueness of the solution in many cases, which is important for predictability in physical systems.

In applications, we typically want the particular solution that matches our specific situation.

Question: How can I verify that my solution to a differential equation is correct?

Answer: Verification is crucial and straightforward:

  1. Substitute back: Plug your solution into the original differential equation
  2. Compute derivatives: Calculate the necessary derivatives of your solution
  3. Check equality: Verify that both sides of the equation are equal
  4. Check initial conditions: If given, ensure your solution satisfies them

For example, if you found \(y = Ce^{3x}\) for \(\frac{dy}{dx} = 3y\):

\(\frac{dy}{dx} = 3Ce^{3x}\) and \(3y = 3Ce^{3x}\) ✓

This verification step catches most errors and builds confidence in your solution.

It's also good practice to check that your solution makes sense in the context of the problem.

Question: What's the difference between ordinary and partial differential equations, and when would I encounter each?

Answer: The distinction is fundamental:

Ordinary Differential Equations (ODEs): Involve derivatives with respect to only one independent variable.

Example: \(\frac{dy}{dx} = 3y\) (one variable x)

Partial Differential Equations (PDEs): Involve partial derivatives with respect to multiple independent variables.

Example: \(\frac{\partial u}{\partial t} = \alpha^2 \frac{\partial^2 u}{\partial x^2}\) (variables t and x)

When you'll encounter them:

  • ODEs: Modeling systems with one independent variable (time, usually) - population growth, chemical reactions, simple mechanical systems
  • PDEs: Modeling systems with multiple independent variables - heat conduction, wave propagation, fluid dynamics, electromagnetic fields

PDEs are generally more complex and require more advanced mathematical tools than ODEs.