7 Ordinary Differential Equations

Mathematics I · Unit 7 · 6 hrs

Ordinary Differential Equations

Exam-focused notes for Ordinary Differential Equations (Mathematics I, MTH117): what the TU syllabus asks and how it has actually been tested, with 9 solved past questions from this unit.

Ordinary Differential Equations in short

This chapter introduces ordinary differential equations and their solutions, then develops the two main first order techniques (separable and linear equations) before treating second order linear equations, both homogeneous and non-homogeneous, ending with the method of undetermined coefficients for finding a particular solution.

Ordinary Differential Equations: notes

Introduction

A differential equation is an equation involving a dependent variable and its derivatives with respect to one or more independent variables. If the derivatives refer to a single independent variable, the equation is called an ordinary differential equation (ODE); if it involves two or more independent variables it is a partial differential equation. The order of a differential equation is the order of the highest derivative appearing in it, and its degree is the power of that highest derivative once the equation is free of fractional powers and radicals in the derivatives.

A solution of a differential equation is a relation between the variables, free of derivatives, that satisfies the equation; the number of arbitrary constants in the general solution equals the order of the equation.

Worked example. Show that $y=3x^2+2$ is a solution of $\dfrac{dy}{dx}=6x$.

Differentiating, $\dfrac{dy}{dx} = 6x$, which is exactly the given equation, so $y=3x^2+2$ is indeed a solution (for any constant replacing the $2$, since only the derivative is used).

Geometric meaning. A first order equation $\dfrac{dy}{dx} = f(x,y)$ says that at every point $(x_0,y_0)$ on a solution curve, the slope of the curve equals $f(x_0,y_0)$. For example, the equation $\dfrac{dy}{dx} = \dfrac{y}{x}$ has general solution $y=mx$ (found by separating variables, below), representing the family of straight lines through the origin with slope $m$; conversely, differentiating the family of concentric circles $x^2+y^2=c^2$ gives $2x+2yy'=0$, i.e. $y' = -x/y$, which is the differential equation of that family.

What this unit covers

  • Introduction
  • Introduction to first order equations Separable equations
  • Linear equations
  • Second order linear differential equations
  • Non homogeneous linear equations
  • Method of undetermined coefficients

Linear equations

2081 · 10 marks

Find the solution of the initial value problem $x^2 y' + x y = 1$, $y(1) = 2$, $x > 0$.

Find the area enclosed by the line $y = x - 1$ and the parabola $y^2 = 2x + 6$. [5+5]

--- Given data: $x^2 y' + xy = 1$, $; y(1) = 2$, $; x 0$ Divide by $x^2$: $$\frac{dy}{dx} + \frac{1}{x}y = \frac{1}{x^2}$$ So $P = \dfrac{1}{x}$, $Q = \dfrac{1}{x^2}$. $$\text{I.F.} = e^{\int \frac{1}{x},dx} = e^{\ln x} = x$$ $$y\cdot x = \int \frac{1}{x^2}\cdot x,dx + C = \int \frac{1}{x},d...

Open this answer on its own page →

2078 · 5 marks

Solve y′+2xy−1=0y' + 2xy - 1 = 0y′+2xy−1=0. [5]

Given: - Differential equation: $y' + 2xy - 1 = 0$ No initial condition given, so we seek the general solution. --- $$\frac{dy}{dx} + 2xy = 1$$ This is a first-order linear ODE: $$\frac{dy}{dx} + P(x),y = Q(x), \qquad P(x) = 2x, \quad Q(x) = 1$$ $$\text{I.F.} = e^{\int P,dx} = e^{\int 2x,dx} =...

Open this answer on its own page →

Introduction to first order equations Separable equations

2081 · 5 marks

Show that every member of the family of function $y = \frac{1 + ce^t}{1 - ce^t}$ is a solution of the differential equation $y' = \frac{1}{2}(y^2 - 1)$. [5]

Show solved answer

Solution

Given Data

  • Family of functions: $y = \dfrac{1 + ce^t}{1 - ce^t}$
  • Differential equation: $y' = \dfrac{1}{2}(y^2 - 1)$

Step 1: Compute the Left Hand Side, $y'$

Using the quotient rule with $u = 1 + ce^t$, $v = 1 - ce^t$:

$$u' = ce^t, \qquad v' = -ce^t$$

$$y' = \frac{u'v - uv'}{v^2} = \frac{ce^t(1 - ce^t) - (1 + ce^t)(-ce^t)}{(1 - ce^t)^2}$$

Simplify the numerator:

$$ce^t(1 - ce^t) + ce^t(1 + ce^t) = ce^t\left[(1 - ce^t) + (1 + ce^t)\right] = ce^t(2) = 2ce^t$$

Therefore:

$$y' = \frac{2ce^t}{(1 - ce^t)^2}$$

Step 2: Compute the Right Hand Side, $\tfrac{1}{2}(y^2 - 1)$

$$y^2 = \frac{(1 + ce^t)^2}{(1 - ce^t)^2}$$

$$y^2 - 1 = \frac{(1 + ce^t)^2 - (1 - ce^t)^2}{(1 - ce^t)^2}$$

Using $A^2 - B^2 = (A+B)(A-B)$ with $A = 1 + ce^t$, $B = 1 - ce^t$:

$$A + B = 2, \qquad A - B = 2ce^t$$

$$(1 + ce^t)^2 - (1 - ce^t)^2 = (2)(2ce^t) = 4ce^t$$

So:

$$y^2 - 1 = \frac{4ce^t}{(1 - ce^t)^2}$$

Multiply by $\tfrac{1}{2}$:

$$\frac{1}{2}(y^2 - 1) = \frac{1}{2}\cdot\frac{4ce^t}{(1 - ce^t)^2} = \frac{2ce^t}{(1 - ce^t)^2}$$

Step 3: Compare

$$y' = \frac{2ce^t}{(1 - ce^t)^2} = \frac{1}{2}(y^2 - 1)$$

The two sides are identical for every value of the arbitrary constant $c$.

Conclusion

Since $y'$ equals $\tfrac{1}{2}(y^2 - 1)$ for all $c$, every member of the family $y = \dfrac{1 + ce^t}{1 - ce^t}$ is a solution of the differential equation $y' = \tfrac{1}{2}(y^2 - 1)$. $\blacksquare$

Open this answer on its own page →

2080 · 5 marks

Show that $y = x - \frac{1}{x}$ is a solution of the differential equation $xy' + y = 2x$. [5]

  • Proposed solution: $y = x - \dfrac{1}{x}$ - Differential equation: $xy' + y = 2x$ --- $$y = x - \frac{1}{x} = x - x^{-1}$$ $$y' = \frac{d}{dx}(x) - \frac{d}{dx}(x^{-1}) = 1 - (-1)x^{-2} = 1 + \frac{1}{x^2}$$ --- $$xy' = x\left(1 + \frac{1}{x^2}\right) = x + \frac{x}{x^2} = x + \frac{1}{x}$$ ---...
Open this answer on its own page →

2078 · 10 marks

Solve: $y' = \frac{x^2}{y^2}$, $y(0) = 2$.

Solve the initial value problem: $y'' + y' - 6y = 0$, $y(0) = 0$, $y'(0) = 1$. [5+5]

Part 1: ODE $y' = \dfrac{x^2}{y^2}$, initial condition $y(0)=2$. Part 2: ODE $y'' + y' - 6y = 0$, initial conditions $y(0)=0$, $y'(0)=1$. --- $$\frac{dy}{dx} = \frac{x^2}{y^2} \implies y^2 , dy = x^2 , dx$$ $$\int y^2 , dy = \int x^2 , dx$$ $$\frac{y^3}{3} = \frac{x^3}{3} + C1$$ Multiply by 3...

Open this answer on its own page →

Second order linear differential equations

2079 · 10 marks

Define initial value problem. Solve: $y'' + 4y' - 6y = 0$, $y(0) = 1$, $y'(0) = 0$. Find the Taylor's series expansion for $\cos x$ at $x = 0$. [10+0]

Show solved answer

Initial Value Problem: Definition and Solutions

Given Data

  • ODE: $y'' + 4y' - 6y = 0$
  • Initial conditions: $y(0) = 1$, $y'(0) = 0$
  • Second task: Taylor (Maclaurin) series of $\cos x$ at $x = 0$

Definition of Initial Value Problem

An initial value problem (IVP) is a differential equation together with the values of the unknown function and its derivatives specified at a single point $x_0$ (the initial point). For a second-order ODE:

$$y'' = f(x, y, y'), \quad y(x_0) = y_0, \quad y'(x_0) = y_1$$

The constants $y_0, y_1$ are the initial conditions, and the aim is to find the particular solution satisfying both the ODE and these conditions.


Solving $y'' + 4y' - 6y = 0$

Step 1: Auxiliary Equation

Assume $y = e^{mx}$:

$$m^2 + 4m - 6 = 0$$

Step 2: Roots

$$m = \frac{-4 \pm \sqrt{16 + 24}}{2} = \frac{-4 \pm \sqrt{40}}{2} = -2 \pm \sqrt{10}$$

Real, distinct roots: $m_1 = -2 + \sqrt{10}$, $m_2 = -2 - \sqrt{10}$.

Step 3: General Solution

$$y = C_1 e^{(-2+\sqrt{10})x} + C_2 e^{(-2-\sqrt{10})x}$$

Step 4: Apply Initial Conditions

$y(0) = 1$: $$C_1 + C_2 = 1 \quad (i)$$

Differentiate: $$y' = C_1(-2+\sqrt{10})e^{(-2+\sqrt{10})x} + C_2(-2-\sqrt{10})e^{(-2-\sqrt{10})x}$$

$y'(0) = 0$: $$C_1(-2+\sqrt{10}) + C_2(-2-\sqrt{10}) = 0$$ $$-2(C_1+C_2) + \sqrt{10}(C_1 - C_2) = 0$$

Using $(i)$: $$-2 + \sqrt{10}(C_1 - C_2) = 0 ;\Rightarrow; C_1 - C_2 = \frac{2}{\sqrt{10}} = \frac{\sqrt{10}}{5} \quad (ii)$$

Solution

Adding $(i)$ and $(ii)$: $$2C_1 = 1 + \frac{\sqrt{10}}{5} = \frac{5+\sqrt{10}}{5} ;\Rightarrow; C_1 = \frac{5+\sqrt{10}}{10}$$

Subtracting: $$2C_2 = 1 - \frac{\sqrt{10}}{5} ;\Rightarrow; C_2 = \frac{5-\sqrt{10}}{10}$$

Particular Solution

$$\boxed{y = \frac{5+\sqrt{10}}{10}, e^{(-2+\sqrt{10})x} + \frac{5-\sqrt{10}}{10}, e^{(-2-\sqrt{10})x}}$$


Taylor (Maclaurin) Series of $\cos x$ at $x = 0$

$$f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \cdots$$

$n$$f^{(n)}(x)$$f^{(n)}(0)$
0$\cos x$$1$
1$-\sin x$$0$
2$-\cos x$$-1$
3$\sin x$$0$
4$\cos x$$1$

Substituting:

$$\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots$$

$$\boxed{\cos x = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n)!}, x^{2n}}$$


Verified results: roots $-2 \pm \sqrt{10}$, constants $\frac{5\pm\sqrt{10}}{10}$, and the standard cosine series.

Open this answer on its own page →

2077 · 5 marks

Solve: $y'' + y = 0$, $y(0) = 5$, $y(\pi/4) = 3$. [5]

  • ODE: $y'' + y = 0$ - Condition 1: $y(0) = 5$ - Condition 2: $y(\pi/4) = 3$ $$m^2 + 1 = 0 \implies m = \pm i$$ Complex roots with $\alpha = 0$, $\beta = 1$. $$y = e^{\alpha x}(A\cos\beta x + B\sin\beta x) = A\cos x + B\sin x$$ $$y(0) = A\cos 0 + B\sin 0 = A = 5$$ $$\therefore A = 5$$ $$y!\left(...
Open this answer on its own page →

2075 · 5 marks

Find the solution of y′′+4y′+4=0y'' + 4y' + 4 = 0y′′+4y′+4=0. [5]

  • Differential equation: $y'' + 4y' + 4 = 0$ - Coefficients (interpreting as homogeneous constant-coefficient ODE): coefficient of $y''$ is $1$, of $y'$ is $4$, of $y$ is $4$. Note on interpretation: As literally written, $y'' + 4y' + 4 = 0$ has a constant term $4$ rather than a $4y$ term, which ...
Open this answer on its own page →

2074 · 5 marks

Find the solution of $y'' + 6y' + 9 = 0$, $y(0) = 2$, $y'(0) = 1$. [5]

  • ODE: $y'' + 6y' + 9 = 0$ - Initial conditions: $y(0) = 2$, $y'(0) = 1$ Note: As written, the equation contains a constant term "$+9$" rather than "$+9y$". Read literally, $y'' + 6y' = -9$ is a non-homogeneous equation. However, the standard textbook problem (and the one that produces a clean se...
Open this answer on its own page →