Differential Equation


Introduction

The differential equation is a tool for solving problems in the field of science, engineering, computer applications, social sciences, etc. This is because of the rates of change of the quantities involved in each phenomenon.

Here is an example: We know that, a cup of hot coffee cools down over time. This cooling process can be mathematically described using a differential equation. The rate at which the coffee's temperature changes depends on the temperature difference between the coffee and its surroundings. By solving this equation, we can predict how quickly the coffee will cool down and decide when it's the best time to enjoy it.




Differential Equation

A differential equation is an equation involving derivatives
The two examples of differential equations are given below.

  1. \( \frac{dy}{dx}=2y \)
  2. \( \frac{d^2y}{dx^2}+6x\frac{dy}{dx}+9x^2y=\sin (2x) \)
NOTE
  1. an equation that involves differentials with the dependent and independent variable, is called the differential equation.
  2. an equation involving derivative with respect to single independent variable is called ordinary differential equation (ODE)
  3. an equation that involves two or more variables then it is said to be partial differential equation (PDE)

Some additional examples of differential equations are given below.

  1. \( \frac{dy}{dx} = x + \tan x \)
  2. \( \frac{d^3y}{dx^3} = x \frac{d^2y}{dx^2}+ \left (\frac{dy}{dx} \right )^2 \)
  3. \( (x + y + 3) dx + (x + y – 2) dy = 0 \)
  4. \( x \frac{\partial z} {\partial x}+y \frac{\partial z}{\partial y} =nz \)

Here (i), (ii) and (iii) have y as dependent variable and x as independent variable, so these are ordinary differential equation (ODE).
and,
(iv) has z as dependent variable and x and y as independent variables, so it is partial differential equation (PDE).




Order: Differential Equation

The order of a differential equation is the order of the highest derivative that appears in the equation.
Some examples are given below.

  1. \( \frac{dy}{dx}=2y \)
    This is first order differential equation
  2. \( \frac{d^2y}{dx^2}+6x\frac{dy}{dx}+9x^2y=sin(2x) \)
    This is second order differential equation
  3. \( \frac{d^3y}{dx^3}+\left ( \frac{d^2y}{dx^2} \right )^4+\frac{dy}{dx}=x \sin x\)
    This is third order differential equation
  4. \( \frac{d^2y}{dx^2} =\sqrt{1+ \left ( \frac{dy}{dx} \right )^2} \)
    This is second order differential equation
  5. \( \left ( \frac{dy}{dx} \right )^2=0\)
    This is first order differential equation
  6. \(y'−4y=x^2−3x+4\)
    The highest derivative in the equation is y′, so the order is 1
  7. \(x^2y'''−3xy''+xy′−3y=\sin x\)
    The highest derivative in the equation is \(y'''\), so the order is 3
  8. \(\frac{4}{x}y^{(4)}−\frac{6}{x^2}y''+\frac{12}{x^4}y=x^3−3x^2+4x−12\)
    The highest derivative in the equation is y(4), so the order is 4



Degree: Differential Equation

The Degree of a differential equation (if it is a polynomial equation) is the highest power (positive integer only) of the highest order derivative in it (if applicable, after it has been made free from radicals.)
Some examples are given below.

  1. \( \left ( \frac{d^2y}{dx^2} \right )^2+\left ( \frac{dy}{dx} \right )^3+3y=\log x \).
    This is a second degree differential equation (It is a second order differential equation also).
  2. \( \frac{d^3y}{dx^3}+\left ( \frac{d^2y}{dx^2} \right )^4+xy=\sin x \).
    This is a first degree differential equation. (Also, it is a third order differential equation).
  3. \( \frac{d^2y}{dx^2}=\sqrt {1+\left ( \frac{dy}{dx} \right )^2} \implies \left ( \frac{d^2y}{dx^2} \right )^2=1+\left ( \frac{dy}{dx} \right )^2 \) .
    This is a second degree differential equation.



Solution: Differential Equation

A relation free from derivatives and satisft the given DE (differential equation) is called solution of DE.

There are threeypes of solutions

  1. General Solution

    Let \( y'=2x\), then general solutions is \(y=x^2+c\).
    A graph of some of these solutions is given in figure below

  2. Particular Solution
    Let \( y'=2x\), and if we take \(y=x^2-3\) as a solution, it is called a particular solution . This kind of solution is obtained by giving particular values to the arbitrary constant(s) in the general solution.
    It is a solution free from arbitrary constant(s)

  3. Complete solution

    The solution which contains as many arbitrary constants as the order of the differential equation is called complete solution




Solved Examples

  1. Example 1
    Let \(y'=3x^2\)
    1. Start with some function \(y=f(x)\) and take its derivative.
    2. The answer must be equal to \(3x^2\)
    3. What function has a derivative that is equal to \(3x^2\)?
    4. One such function is \(y=x^3\)
    So, \(y=x^3\) is considered a solution to a differential equation \(y'=3x^2\)
  2. Example 2
    \(y'=2x\)
    a solution is \(y=x^2\)
  3. Example 3
    \(y'+3y=6x+11\)
    a solution is \(y=e^{-3x}+2x+3\)
  4. Example 4
    \(y''−3y'+2y=24e^{-2x}\)
    a solution is \(y=3e^x-4e^{2x}+2e^{-2x}\)
  5. Example 5
    \(y'=2y\)
    a solution is \(y=e^{2x}\)
  6. Example 6
    \(y'=e^{3x}\)
    a solution is \(y=\frac{e^{3x}}{3}-\frac{1}{3} \)
  7. Example 7

    Show that \( y = A \cos x + \sin x \) is a solution of \( \cos x \frac{dy}{dx} + y \sin x = 1\)
    Solution
    Let,
    \( y = A \cos x + \sin x \)
    Differentiating w. r. to x then
    \( \frac{dy}{dx} = - A \sin x + \cos x \)
    or \( \cos x \frac{dy}{dx} = - A \sin x \cos x + \cos ^2x \)
    or \( \cos x \frac{dy}{dx} = - \sin x (A \cos x )+ \cos ^2x \)
    or \( \cos x \frac{dy}{dx} = - \sin x (A \cos x+ \sin x- \sin x )+ \cos ^2x \)
    or \( \cos x \frac{dy}{dx} = -\sin x (y - \sin x) + \cos ^2x \)
    or \( \cos x \frac{dy}{dx} = - y \sin x + (\sin ^2x + \cos ^2x) \)
    or \( \cos x \frac{dy}{dx} = - y \sin x + 1 \)
    or \( \cos x \frac{dy}{dx} + y \sin x = 1 \)
    This means
    \( y = A \cos x + \sin x \)
    is a solution of
    \( \cos x \frac{dy}{dx} + y \sin x = 1\)




Direct Integrable : Differential Equation

The differential equation of the form
\( \frac{dy}{dx}=f(x)\)
Here the right-hand side is an expression in the independent variable x and contains no terms involving the dependent variable y.
We call differential equations of this type directly integrable.

  1. \( \frac{dy}{dx}=4\)
  2. \(\frac{dy}{dx}=x^2\)
  3. \(\frac{dy}{dx}=\sin x \)
  4. \(\frac{dy}{dx}=\frac{1}{x}\)
  5. \( \frac{dy}{dx}=x^3-5 \)
  6. \(\frac{dy}{dx}=2x+3\)
  7. \(\frac{dy}{dx}=e^{2x}\)
are dirrect integrable differential equations
But
  1. \( \frac{dy}{dx}=2xy\)
  2. \( \frac{dy}{dx}=x-y\)
are NOT dirrect integrable.


First Order First Degree: Differential Equation

The differential equation of the form
\( \frac{dy}{dx} =f(x,y) \) and \( f(x,y) dx+g(x,y)dy=0 \)
is called a first order and first degree differential equation.
Some examples of first order first degree differential equation are given below.

  1. \( \frac{dy}{dx}=\frac{x^2+x+1}{y^2+y+1} \)
  2. \( \sqrt{1-x^2} dy+\sqrt{1-y^2} dx=0\implies \frac{dy}{dx}=- \frac{\sqrt{1-y^2} }{\sqrt{1-x^2} } \)
  3. \( \frac{dy}{dx}=\frac{x^3+1}{y^3+1} \)
  4. \( (1 + \cos x) dy = (1 -\cos x) dx \implies \frac{dy}{dx}=\frac{1-\cos x}{1+\cos x} \)
  5. \( x^2 dy - y^2 dx = 0 \implies \frac{dy}{dx}=\frac{y^2}{x^2} \)



Method of Solving First Order First Degree ODE

  1. Direct Integrable
  2. Seperable Variable
  3. Reducible to seperable variable
  4. Homogeneous equation
  5. Reducible to homogeneous equation
  6. Linerar differential equation
  7. Reducible to linear differential equation
  8. Exact differential equation
  9. Reducible to exact differential equation



Separable of Variables

If differential equations is of the form
\( \frac{dy}{dx}= f(x)g( y )\).
Then, the differential equations of this form is called separable.

Some examples are
  1. \( \frac{dy}{dx}= xy^2 \)
  2. \( \frac{dy}{dx}= \sin x \cos y \)
  3. \( \frac{dy}{dx}= \frac{x}{y^2} \)
  4. \( \frac{dy}{dx}=\frac{\sin y}{\cos x}\)
Some Non examples are
  1. \( \frac{dy}{dx}= x+y\)
  2. \(\frac{dy}{dx}=xy^2+1\)
  3. \( \frac{dy}{dx}=\log (xy) \)
because the right-hand sides cannot be written in terms of f(x)g( y )
If the differential equation is in the form of
\( \frac{dy}{dx}= f(x)g( y )\).
or
\( f (x) dx = f (y) dy \) (i)
Then, we can obtain its solution by integrating both sides.
Thus, the solution of differential equation (i) is
\( \int f (x) dx = \int f ( y ) dy + c\) (ii)
NOTE
  1. Remember a formula:
    \( \int \frac{f’(x)}{f(x)}dx =\log f(x) +c \)
    For example,
    \( \int \left ( \frac{2ax+b}{ax^2+bx+c} \right ) dx=\log (ax^2+bx+c) \)
  2. Remember a formula:
    \( \int \frac{f’(x)}{f(x)^n} dx=\frac{f(x)^{1-n}}{1-n}+c\) for \( n \ne 1\)
    For example,
    \( \int \left ( \frac{2ax+b}{(ax^2+bx+c)^n} \right ) dx= \frac{(ax^2+bx+c)^{1-n}}{1-n} \) for \( n \ne 1\)



Solved Examples

  1. \( \frac{dy}{dx}= \frac{x^2}{y}\)
    Solution
    This is of the form
    \( \frac{dy}{dx}= f(x)g(y)\) with \(f(x) = x^2\) and \(g(y) =\frac{1}{y}\)
    or \(\int y dy =\int x^2 dx\)
    Now integrate both sides , we get
    \(\frac{y^2}{2}=\frac{x^3}{3}+c\).
    or \(y=\pm \sqrt{\frac{2}{3} x^3}+c\)
  2. \( \frac{dy}{dx} = \frac{x^2 + x + 1}{y^2 + y + 1} \)
    Solution
    \( \frac{dy}{dx} = \frac{x^2 + x + 1}{y^2 + y + 1} \)
    or \((y^2 + y + 1) dy = (x^2 + x + 1) dx \)
    Taking integration on both sides, we get
    \( (y^2 + y + 1) dy = (x^2 + x + 1) dx\)
    or \( \frac{y^3}{3} + \frac{y^2}{2} + y = \frac{x^3}{3} + \frac{x^2}{2} + x + c\)
    or \( 2(x^3 - y^3) + 3(x^2- y^2) + 6(x - y) = c \)
  3. \( \frac{dy}{dx} = \frac{x^3 + 1}{ y^3 + 1} \)
    Solution
    \( \frac{dy}{dx} = \frac{x^3 + 1}{y^3 + 1 } \)
    or \( (y^3 + 1) dy = (x^3 + 1) dx \)
    Taking integration on both sides
    \( (y^3 + 1) dy = (x^3 + 1) dx \)
    or\( \frac{y^4}{4} + y = \frac{x^4}{4} + x + c \)
    or \( y^4 + 4y = x^4 + 4x + 4c \)
    or \( y^4 + 4y = x^4 + 4x + c\)
    This is the solution of given equation.
  4. \( y(1 + x) dx + x(1 + y) dy = 0\).
    Solution
    \( y(1 + x) dx + x(1 + y) dy = 0 \)
    or \( \left ( \frac{1+x}{x} \right ) dx + \left ( \frac{1+y}{y} \right ) dy = 0 \)
    or \( \left ( \frac{1}{x}+1 \right ) dx + \left ( \frac{1}{y}+1 \right ) dy = 0 \)
    Taking integration on both sides,
    \( \int \left ( \frac{1}{x}+1 \right ) dx + \int \left ( \frac{1}{y}+1 \right ) dy = c \)
    or \( ln(x) + x + ln(y) + y = c \)
  5. \( \frac{dx}{dy} = e^{x-y} \).
    Solution
    \( \frac{dx}{dy} = e^{x-y} \)
    or \(\frac{dx}{dy} = \frac{e^x}{e^y} \)
    or \( e^y dy = e^x dx \)
    Taking integration on both sides
    \( e^y dy = e^x dx \)
    or \( e^y = e^x + C\)
  6. \( \sqrt{(1-x^2)} dy + \sqrt{(1-y^2)} dx = 0 \)
    Solution
    \( \sqrt{(1-x^2)} dy + \sqrt{(1-y^2)} dx = 0\)
    or \( \sqrt{(1-x^2)} dy = -\sqrt{(1-y^2)} dx \)
    or \( \frac{dy}{\sqrt{(1-y^2)}} = - \frac{dx}{\sqrt{(1-x^2)}} \)
    Taking integration on both sides
    \( \frac{dy}{\sqrt{(1-y^2)}} = - \frac{dx}{\sqrt{(1-x^2)}} \)
    or \( \sin^{-1}y = - \sin^{-1}x + C \)
    or \( \sin^{-1}y + \sin^{-1}x = C \)
  7. Find the particular solution of \( (x + xy^2) dx + (y + x^2y) dy = 0; y(0) = 2 \).
    Solution
    \( (x + xy^2) dx + (y + x^2y) dy = 0 \)
    or \( x(1 + y^2) dx + y(1 + x^2) dy = 0 \)
    or \( y(1 + x^2) dy = -x(1 + y^2) dx \)
    or \( \left ( \frac{y}{1+y^2} \right ) dy = \left ( \frac{-x}{1+x^2} \right ) dx \)
    Taking integration on both sides
    \( 2\left ( \frac{y}{1+y^2} \right ) dy = - 2 \left ( \frac{x}{1+x^2} \right ) dx + c \)
    or \( \log (1 + y^2) = - \log (1 + x^2) + c\)
    or \( \log (1 + y^2) + \log (1 + x^2) = c \)
    or \( (1 + y^2)(1 + x^2) = c \) (i)
    or\( (1 + y^2)(1 + x^2) = c \)
    This is the general solution of the given differential equation.
    Given that y(0) = 2. So, the equation (i) gives
    \( (1 + 2^2) (1 + 0) = c \implies c = 5 \)
    Therefore, (i) becomes,
    \( ( (1 + y^2)(1 + x^2)) = 5\)
    This is the particular solution of the equation.



Exercise

Solve following differential equation

  1. \( \frac{dy}{dx}=\frac{y \sin x}{y+1} \)
  2. \( \frac{dy}{dx}=\frac{-x}{y} \)
  3. \( \frac{dy}{dx}=\frac{1+e^x}{1+\cos y} \)



Homogeneous DE

A differential equation is said to be homogeneous differential equation if it can be put in the form of
\( \frac{dy}{dx} =f\left( \frac{y}{x} \right ) \)
For example

  1. A equation \( \frac{dy}{dx}=\frac{y}{x}+\sin \left ( \frac{y}{x} \right ) \) which can be writen in the form of \( \frac{dy}{dx}=f \left ( \frac{y}{x}\right ) \) is homogeneous.
  2. A equation \( \frac{dy}{dx}=\frac{xy}{x^2-y^2}\) which can be writen in the form of \( \frac{dy}{dx}=\frac{\frac{y}{x}}{1-( \frac{y}{x})^2} =f \left ( \frac{y}{x}\right ) \) is homogeneous.

Solution Process

To find the solution of such homogeneous differential equation, we put
\( \frac{y}{x} = v \)
i.e. \( y = vx \) (i)
Differentiating both sides with respect to x,
\( \frac{dy}{dx} = v + x \frac{dv}{dx} \) (ii)
Then
\( \frac{dy}{dx} =f\left( \frac{y}{x} \right ) \)
or \( v + x \frac{dv}{dx} = f(v) \)
or \( x \frac{dv}{dx} = f(v) - v\)
or \( \frac{dv}{f(v) - v} = \frac{dx}{x} \)
Taking integration on both sides
\( \int \frac{dv}{f(v) - v} = \int \frac{dx}{x}\)
or \( \int \frac{dv}{f(v)- v} = \log (x) + C\)
After integrating L.H.S, we substitute
\( \frac{y}{x} \) for \( v\)
which gives the required general solution.




Solved Examples

  1. \( \frac{dy}{dx} = \frac{y}{x} + sin \left (\frac{y}{x} \right ) \)
    Solution:
    \( \frac{dy}{dx} = \frac{y}{x} + sin \left ( \frac{y}{x} \right ) \)

    or\( \frac{dy}{dx} = f \left ( \frac{y}{x} \right ) \) (i)
    Here, (i) is homogeneous differential equation.
    So, put
    \( y = vx\) .
    Then
    \( \frac{dy}{dx} = v + x \frac{dv}{dx} \).

    or \( \frac{y}{x} + sin \left ( \frac{y}{x} \right ) = v + x \frac{dv}{dx} \)

    or \( v + \sin \left ( v \right ) = v + x \frac{dv}{dx} \)

    or \(x \frac{dv}{dx}=\sin \left ( v \right ) \)

    or \(\frac{dx}{x} =\csc ( v ) dv \)

    Taking integration on both sides
    \( \int \frac{dx}{x} = \int \csc v dv \)

    or \( \log (x) + \log (c) = \log (\csc v - \cot v) \)

    or \( cx = \frac{1}{\sin v}-\frac{\cos v}{ \sin v }\)

    or \( cx = \frac{1- \cos v} {\sin v} \)

    or \( cx = \frac{2 \sin^2(v \backslash 2)}{2 \sin(v \backslash 2) \cos(v \backslash 2)} \)

    or \( cx = \tan(v \backslash 2)\)

    or \( cx = \tan \left ( \frac{y}{2x} \right ) \)

    This is the general solution of the given equation.
  2. \( (x^2 + y^2) \frac{dy}{dx} = xy \).
    Solution:
    \( (x^2 + y^2) \frac{dy}{dx} = xy \)

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

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

    or \( \frac{dy}{dx} = f \left ( \frac{y}{x} \right ) \) (i)

    Here, (i) is homogeneous differential equation. So, put
    \( y = vx\).
    Then

    \( \frac{dy}{dx} = v + x \frac{dv}{dx} \) .

    or \( \frac{xy}{x^2 + y^2} = v + x \frac{dv}{dx} \) .

    or \( \frac{x(vx)}{x^2 + (v^2x^2)}=v + x \frac{dv}{dx} \)

    or \( \frac{v}{1 + v^2}=v + x \frac{dv}{dx} \)

    or \( \frac{v}{1 + v^2}-v + x \frac{dv}{dx} \)

    or \( x \frac{dv}{dx} = \frac{v - v - v^3}{ 1 + v^2} \)

    or \( x \frac{dv}{dx} = \frac{-v^3}{1 + v^2 } \)

    or \( \left ( \frac{1 + v^2}{v^3} \right ) dv = - \frac{dx}{x} \)
    Taking integration on both sides

    \( \left ( \frac{1 + v^2}{v^3} \right ) dv = - \int \frac{dx}{x} \)

    or \( \frac{1}{v^3} dv + \int \frac{1}{v} dv = - \int \frac{dx}{x} \)

    or \(\frac{v^{-3+1}}{-3 + 1} + \log (v) + \log (c) = - \log (x) \)

    or \(- \log (v) - \log (x) - \log (c) = \frac{v^{-3+1}}{-3 + 1} \)

    or \(- \log (cvx) = - \frac{1}{2v^2} \)
    or \(\log (cy) = \frac{1}{2} \left ( \frac{x^2}{y^2} \right ) \)

    or \(x^2 - 2y^2 \log (cy) = 0\)
    This is the general solution of the equation.



Equation Reducible to Homogeneous Form

A differential equation of the form
\( \frac{dy}{dx} = \frac{ax + by + c}{Ax + By + C} \) (i)
with
\( \frac{a}{A} \ne \frac{b}{B} \)
then (i) can be reduced to a homogenous form by changing the variables x, y to X, Y related by the equations
\( x = X + h, y = Y + k \)
where h, k are constants to be chosen so as to make the given equation is homogenous.
Therefore,
\( \frac{dx}{dX} = 1 \implies dx = dX \) and \( \frac{dy}{dY} = 1 \implies dy = dY \)
Then (i) becomes,
\( \frac{dY}{dX} = \frac{dy}{dx} = \frac{aX + bY + (ah + bk + c)}{AX + BY + (Ah + Bk + C)} \) (ii)
Choose h and k so that
\( ah + bk + c = 0 \)
\( Ah + Bk + C = 0 \)
Then (ii) becomes,
\( \frac{dY}{dX} = \frac{aX + bY}{AX + BY} \)
which is a homogenous differential equation; it can be solved by means of substitution,
\( \frac{Y}{X} = v \) i.e. \( Y = vX\)
Exceptional case:
If \( \frac{a}{A} = \frac{b}{B} = P (let) \) then such type of problem is solved by using method of variables separable, which we discussed earlier.




Linear DE

A first-order differential equation involving the independent variable x and the dependent variable y is linear if it can be expressed in the form
\( \frac{dy}{dx}+ g(x)y = h(x)\) (1)
where g(x) and h(x) are given functions.

The term linear in (1) refers to the dependent variable y. So, any functions g(x) and h(x) are allowed , but the only occurrences of y is allowed .
This means that terms involving \(y^2, y^3, \sin y\), and so on, are not allowed.

For example,
\( \frac{dy}{dx}-x^2y = x^3\) is linear, with \(g(x) = −x^2\) and \(h(x) = x^3\)
whereas the differential equation
\( \frac{dy}{dx}=xy^2\) is not linear, due to the presence of the term \( y^2\).

Note that if g(x) = 0, then equation (1) reduces to
\( \frac{dy}{dx}= h(x)\)
which is the directly integrable type. So, directly integrable differential equations are also linear differential equations.




Solution of \(\frac{dy}{dx} + ky=0\)

Let a first-order differential equation is
\( \frac{dy}{dx}-ky=0\) (1)
Then
\( y = e^{-kx}\)
is a solution of the differential equation (1)
because with \( y = e^{-kx}\) the left-hand side of the differential equation equals
\( \frac{dy}{dx}=\frac{d}{dx} e^{-kx}=-ke^{-kx}=-ky \)
which is the same as
\( \frac{dy}{dx}+ky=0\)



Constant-coefficient linear differential equations: case 1

In a linear differential equation
\( \frac{dy}{dx}+ g(x)y = h(x)\)
if
h(x) = 0 (so the equation is homogeneous) and g(x) = A, where A is a constant, then
we have
\( \frac{dy}{dx}+ g(x)y = h(x)\)
or \( \frac{dy}{dx}+ Ay =0\)
It is equivalent to the form
\( \frac{dy}{dx}+Ay=0\)
It has solution
\(y = e^{−Ax}\)




Constant-coefficient linear differential equations: case 2

In a linear differential equation
\( \frac{dy}{dx}+ g(x)y = h(x)\)
if \( h(x) \ne 0\) (that is, the differential equation is inhomogeneous) and g(x) = A, where A is a constant. This gives the form
\( \frac{dy}{dx}+ g(x)y = h(x)\)
or \( \frac{dy}{dx}+ Ay =h(x)\)
which is called a constant-coefficient first-order linear differential equation.

The solution of this equation can be done as follows..
First multiply both sides by \( e^{Ax}\)
\( e^{Ax} \frac{dy}{dx}+ e^{Ax} Ay =e^{Ax} h(x)\)
Now, by the product rule for differentiation
\( \frac{d e^{Ax} y}{dx}= e^{Ax} h(x)\)
This equation can be solved by integrating both sides with respect to x, which gives
\( e^{Ax}y=\int e^{Ax} h(x) dx \)
Hence the general solution of differential equation is
\( y=e^{-Ax} \left ( \int e^{Ax} h(x) dx \right ) \)
So, if we can find the integral on the right-hand side, then we can solve
differential equation

Solved Examples

  1. \( \frac{dy}{dx}+ 2y = x\)
    The differential equation has the form
    \( \frac{dy}{dx}+ Ay = h(x)\)
    with A = 2 and h(x) = x.
    So the solution is given by equation
    \( y=e^{-Ax} \left ( \int e^{Ax} h(x) dx \right ) \)
    or \( y=e^{-2x} \left ( \int e^{2x} x dx \right ) \)
    Integrating by parts gives
    \( y=e^{-2x} \left ( \frac{1}{2} x e^{2x} - \frac{1}{2} \int e^{2x} dx \right ) \)
    or \( y=\frac{1}{2} e^{-2x} \left ( x e^{2x} -\int e^{2x} dx \right ) \)
    or \( y=\frac{1}{2} e^{-2x} \left ( x e^{2x} -\frac{1}{2} e^{2x} +c\right ) \)
    or \( y=\frac{1}{2} ( x -\frac{1}{2} +ce^{-2x}) \)
    this is a general solution
  2. \( \frac{dy}{dx}+y = e^{2x}\)



The integrating factor method

The key to solving the constant-coefficient linear differential equation was to multiply both sides by
\( e^{Ax}\).
This allowed us to integrate the left-hand side of the equation.

For this reason, \( e^{Ax}\) is called an integrating factor for the differential equation.
We now generalize this trick to solve the general linear first-order differential equation




Linear differential equation: The integrating factor method

The general solution of a differential equation of the form
\( \frac{dy}{dx}+g(x)y = h(x)\)
is
\(y= \frac{1}{p(x)} \left ( \int p(x)h(x) dx \right ) \)
where
\( p(x)=e^{\int g(x) dx}\)

Proof

Let \( p(x) = e^u\), where \(u =\int g(x) dx\) and then
\( \frac{dp}{dx}=\frac{d e^u}{du}\frac{du}{dx} =e^u g(x)=p(x)g(x)\)
Now, given DE is
\( \frac{dy}{dx}+g(x)y = h(x)\)
Multiplying both sides of equation by p(x) , we get
\( p(x) \frac{dy}{dx}+ p(x)g(x)y = p(x)h(x)\)
or \( \frac{d}{dx} P(x)y = p(x)h(x)\)
It follows that
\( p(x)y = \int p(x)h(x) dx\)
Dividing both sides by p(x) gives the general solution as
\( y = \frac{1}{p(x)} \int p(x)h(x) dx\)




Note that, if
g(x) = A,
then the integrating factor given by equation is
\( p(x)=e^{\int g(x) dx}\)
or \( p(x)=e^{\int A dx}\)
or \( p(x)=e^{Ax}\)
This is exactly the integrating factor that was used in Constant-coefficient
The general solution given by equation is therefore
\(y= e^{-Ax}\left ( \int e^{Ax}h(x) dx \right ) \)
exactly the same as equation Constant-coefficient




Solved Examples

  1. \( \frac{dy}{dx}-y = e^x \sin x\)
    Solution
    The differential equation has the form
    \( \frac{dy}{dx}+ g(x)y = h(x)\)
    with g(x) = -1 and \( h(x) = e^x \sin x\). so we use the integrating factor method
    First calculate an integrating factor, without including a constant of integration the integrating factor is
    \( p(x)=e^{\int g(x) dx}\)
    or \( p(x)=e^{\int (-1) dx}\)
    or \( p(x)=e^{-x}\)
    Calculate the general solution, including the constant of integration inside the brackets The general solution is
    \(y= \frac{1}{p(x)} \left ( \int p(x)h(x) dx \right ) \)
    or \(y= \frac{1}{e^{-x}} \left ( \int e^{-x} e^x \sin x dx \right ) \)
    or \(y= e^x \int \sin x dx \)
    or \(y= e^x (- \cos x +c) \)
    where c is an arbitrary constant
  2. \( \frac{dy}{dx}=\frac{y-1}{x} \)
  3. \( \frac{dy}{dx}=y+x\)
  4. \( x \frac{dy}{dx}-3y =x\)



Exact Differential Equation

Partial Derivative

Let f(x, y) be a function of two independent variables x and y. Then the partial derivative of f with respect to x is the differentiation of f with keeping y as constant and x as variable. Also, the partial derivative of f with respect to y is the differentiation of f with keeping x as constant and y as variable.
That is,
\( \frac{\partial f}{\partial x} = \displaystyle \lim_{\Delta x \to 0} \frac{f(x+\Delta x,y)-f(x,y)}{\Delta x}\) and
\( \frac{\partial f}{\partial y} = \displaystyle \lim_{\Delta y \to 0} \frac{f(x,y+\Delta y)-f(x,y)}{\Delta y} \).

Total Derivative

Let f(x, y) be a function of two independent variables x and y.
Let
\( \frac{\partial f}{\partial x} \) and \( \frac{\partial f}{\partial y}\) exist.
Then the total derivative of f(x, y) with respect to x is
\( \frac{d f}{d x} = \frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy\).

Mixed Derivative Theorem for Partial Derivative

Let f(x, y) be function of two variables x and y and has continuous partial derivatives
i.e. \( \frac{\partial ^2 f}{\partial x \partial y} \) and \( \frac{\partial ^2 y}{\partial x \partial y} \) exist
Then
\( \frac{\partial ^2 f}{\partial x \partial y} = \frac{\partial ^2 y}{\partial x \partial y} \)

Example 1

Find the partial derivative of \( f(x, y) = x^3 + 2x^2y + 3x + 4y \) with respect to y.
Solution:
Given function is,
\( f(x, y) = x^3 + 2x^2y + 3x + 4y \)
Then the partial derivative of f w.r. to y is
\( \frac{\partial f}{\partial y} = 0 + 2x^2 + 0 + 4 = 2x^2 + 4\) (being x as constant)

Example 2

Find the partial derivative of \( u(x, y) = 2 \sin x + 4xy^2 + e^{xy} \) with respect to x.
Solution:
Given function is
\( u(x, y) = 2 \sin x + 4xy^2 + e^{xy} \)
Then the partial derivative of u w.r. to x is,
\( \frac{\partial u}{\partial x} = 2 \cos x + 4y^2 + ye^{xy} \).

Exact Differential Equation

A differential equation of the form
\( M dx + N dy = 0 \)
where M and N are functions of x and y or constants, is called exact differential equation if there is a function f(x, y) such that
\( M dx + N dy = d(f(x, y)) \)
That is
\( M = \frac{\partial f}{\partial x} \) and \( N = \frac{\partial f}{\partial y} \)
This implies
\( \frac{\partial M}{\partial y} =\frac{\partial N}{\partial x} \)
Note that
if the differential equation
\( M dx + N dy = 0 \)
is exact then we must have
\( \frac{\partial M}{\partial y} =\frac{\partial N}{\partial x} \)

Solution Process to an Exact Differential Equation

If \( Mdx + Ndy = 0\) is exact then the solution of the equation can be obtained by solving
\( \int Mdx + \int \text{(term of N free from x)} dy = C \) (Constant)

Example 1

Solve the differential equation:\( x dx + y dx = 0\)
Solution:
Given equation is
\( x dx + y dx = 0\) (i)
Comparing (i) with \( M dx + N dy = 0 \) then
\( M = y ,N = x \).
Then,
\( \frac{\partial M}{\partial y}= 1\) and \( \frac{\partial N}{\partial x} = 1\)
This means (i) is exact. Therefore, the solution of (i) is,
\( \displaystyle \int_{y–constant}^0 Mdx + \int \text{(term of N free from x)} dy = C \)
or \( \int y dx + \int 0 dy = C \)
or \( xy = C \)
This is the required solution of the exact differential equation (i).

Example 2

Solve the differential equation: \( x^2 dx + y^2 dy = 0\)
Solution:
Given equation is
\( x^2 dx + y^2 dy = 0\) (i)
Comparing (i) with \( M dx + N dy = 0 \) then,
\( M = x^2, N = y^2\)
Then,
\( \frac{\partial M}{\partial y}= 0\) and \( \frac{\partial N}{\partial x} = 0\)
This means (i) is exact.
Therefore, the solution of (i) is,
\( \displaystyle \int_{y–constant}^0 Mdx + \int \text{(term of N free from x)} dy = C \)
or \( \frac{x^3}{3} + \int y^2 dy = \frac{C}{3} \)
or \( x^3 + y^3 = C \)
This is the required solution of the exact differential equation (i).




Initial Value Problem

Let us consider a differential equation
\( \frac{dy}{dx}=x^2\)
which has the general solution
\( y=\frac{1}{3}x^3+c\)
where c is an arbitrary constant.

Different values for c give different particular solutions, and graphs of the particular solutions corresponding to \( c=\frac{1}{3},\frac{2}{3},1,\frac{4}{3}\) are shown in Figure below.

Now, we might need a particular solution whose graph passes through the point (1, 1).
As shown in Figure below, the particular solution with this property is
\( y=\frac{1}{3}x^3+\frac{2}{3}\)
So choosing a point through which the graph of the solution must pass is equivalent to picking a particular solution.

If a particular solution is specified in this way, by requiring that its graph passes through a given point, then this requirement is called an initial condition. In the example above, the particular solution
\( y=\frac{1}{3}x^3+\frac{2}{3}\)
satisfies the initial condition y = 1 when x = 1.

Definition

A differential equation together with initial condition, is called initial value problems. The solution of the nth order differential equation includes n arbitrary constants which will be determined by given n-initial conditions. Thus, the solution of an initial value problem is the particular solution of the problem.

Example 1

Consider a differential equation
\( cosx \frac{dy}{dx} + y sinx = 1, y(0) = 3 \) (i)
Then y(0) is initial condition of the problem and the value of y is 3 when x is 0.
From above problem we observe the general solution of the problem is
\( y = A \cos x + \sin x \) (ii)
Using \( y(0) = 3\) to (ii) we get
\( 3 = A \cos 0 + \sin 0 \implies A = 3\)
Therefore (ii) becomes
\( y = 3 \cos x + \sin x \)
which is the particular solution of given differential equation satisfying initial condition \( y(0) = 3\).

Exercise

Solve the following differential equation

  1. \( \frac{dy}{dx}=x^3-5\).
    Find the particular solution of this differential equation that satisfies the initial condition y = −1 when x = 2.
  2. \( \frac{dy}{dx}=\frac{5}{2\sqrt{x}}\).
    Find the particular solution of this differential equation that satisfies the initial condition y = 7 when x = 1; that is, y(1) = 7
  3. \( \frac{dy}{dx}=\sqrt{x}\).
    Find the particular solution of this differential equation that satisfies the initial condition where y = 5 when x = 4
  4. \( \frac{dy}{dx}=cos(2x)\).
    Find the particular solution of this differential equation that satisfies the initial condition where y = -2 when \(x = \frac{1}{4}\pi\)



Second-Order Linear Differential Equations

Consider the second-order differential equation
xy''+2x2y′+5x3y=0
Notice that y and its derivatives appear in a relatively simple form. They are multiplied by functions of x, but are not raised to any powers themselves, nor are they multiplied together.

As we know, the First-order equations with similar characteristics are said to be linear. The same is true of second-order equations.

Please note that all the terms in this differential equation involve either y or one of its derivatives. There are no terms involving only functions of x. Equations like this, in which every term contains y or one of its derivatives, are called homogeneous.

Alos nothe that, Not all differential equations are homogeneous. Consider the differential equation
xy''+2x2y′+5x3y=x2
The x2 term on the right side of the equal sign does not contain y or any of its derivatives. Therefore, this differential equation is non-homogeneous.

Definition

A second-order differential equation is linear if it can be written in the form
a2(x)y''+a1(x)y′+a0(x)y=r(x)
where a2(x), a1(x), a0(x), and r(x) are real-valued functions and a2(x) is not identically zero.
If r(x)≡0—in other words, if r(x)=0 for every value of x—the equation is said to be a homogeneous linear equation.
If r(x)≠0 for some value of x, the equation is said to be a non-homogeneous linear equation.

Important NOTES

In linear differential equations, y and its derivatives can be raised only to the first power and they may not be multiplied by one another. Terms involving y2 or \( \sqrt{y'}\) make the equation nonlinear. Functions of y and its derivatives, such as siny or \(e^y′\), are similarly prohibited in linear differential equations.

Note that equations may not always be given in standard form (the form shown in the definition). It can be helpful to rewrite them in that form to decide whether they are linear, or whether a linear equation is homogeneous.

Classify each of the following equations as linear or nonlinear. If the equation is linear, determine further whether it is homogeneous or nonhomogeneous.

  1. \(y''+3x^4y'+x^2y^2=x^3\)
  2. \((\sin x)y''+(\cos x)y'+3y=0\)
  3. \( 4t^2x''+3txx′+4x=0\)
  4. \(5y''+y=4x^5\)
  5. \( (\cos x)y''−\sin y'+( \sin x)y−\cos x=0 \)
  6. 8ty''−6t2y′+4ty−3t2=0
  7. sin(x2)y''−(cosx)y′+x2y=y′−3
  8. y''+5xy′−3y=cosy

No comments:

Post a Comment