chaitra-1.pptx fake news detection using machine learning
Β
Extra Help 19- differential equations.pptx
1. At the end of this lesson you should be able to:
β’ Solve First Order Differential Equations
FC311 β Intermediate Maths
2. Differential equations
In this course we will mainly be looking at first-order differential equations.
A differential equation in two variables x and y is an equation that contains derivatives of y
with respect to x. For example:
2
= 4 +1,
dy
x
dx
3
= ,
dy
xy
dx
2 + = 5 .
dy
x y xy
dx
The order of a differential equation is given by the highest order of derivative that occurs in
it.
First-order differential equations contain terms in ,
dy
dx
second-order differential equations contain terms in ,
2
2
d y
dx
third-order differential equations contain terms in , etc.
3
3
d y
dx
3. Differential equations
For example, suppose we have the differential equation:
The solution to a differential equation in x and y will take the form y = f(x).
The simplest differential equations are those of the form:
f
= ( )
dy
x
dx
Differential equations of this form can be solved by integrating both sides with respect to x
to give:
f
= ( )
y x dx
ο²
= 4 +1
dy
x
dx
4. Differential equations of the form = f(x)
Integrating both sides with respect to x gives:
dy
dx
= (4 +1)
y x dx
ο²
2
= 2 + +
y x x c
Since the constant c can take any value, this represents a whole family of solutions as
shown here: π¦ = 2π₯2
+ π₯ + 17. π¦ = 2π₯2
+ π₯ β 4011. π¦ = 2π₯2
+ π₯ β π
These are just three examples. There are an infinite number of possibilities
This is called the general solution
to the equation .
dy
x
dx
= 4 +1
5. Finding a particular solution
Suppose that as well as being given the differential equation:
Substituting x = 1 and y = 4:
we are also told that when x = 1, y = 4.
We can use this additional information to find the value of the arbitrary constant c in the
general solution:
y x x c
2
= 2 + +
4 = 2 + 1 + c
c = 1
This gives us the particular solution: y x x
2
= 2 + +1
= 4 +1
dy
x
dx
6. Solving first-order differential equations
Find the particular solution to the differential equation
given that y = 6 when x = 0.
Divide both sides by (x2 + 1):
Integrate both sides with respect to x:
dy
x x
dx
2
( +1) = 4
2
4
=
+1
dy x
dx x
x
y
x
ο² 2
2
= 2
+1
y x c
2
= 2ln( +1)+
We can use brackets
because x2 + 1 > 0.
Writing the quotient
in the form .
f
f
'( )
( )
x
x
7. Solving first-order differential equations
Substitute x = 0 and y = 6:
The particular solution is therefore:
c
6 = 2ln(1)+
c = 6
y x2
= 2ln( +1)+6
8. Separating variables
Differential equations that can be arranged in the form
can be solved by the method of separating the variables.
This method works by collecting all the terms in y, including the βdyβ, on one side of the
equation, and all the terms in x, including the βdxβ, on the other side, and then integrating.
f g
( ) = ( )
dy
y x
dx
f g
( ) = ( )
y dy x dx
ο² ο²
f g
( ) = ( )
y dy x dx
9. Separating variables
Find the general solution to .
+ 2
=
dy x
dx y
= ( + 2)
y dy x dx
ο² ο²
2 2
= + 2 +
2 2
y x
x c
2 2
= + 4 +
y x x A
We only need a βcβ on
one side of the equation.
You can miss out the step
and use the fact that
to separate the dy from the
dx directly.
... =...
dy
dx dy
dx
= ( + 2)
dy
y dx x dx
dx
ο² ο²
2
= + 4 +
y x x A
Separate the variables and integrate:
Rearrange to give: = + 2
dy
y x
dx
It doesnβt make much
sense to have β2πβ since
π is just a constant whoβs
value we donβt know. So
we will replace 2π with π΄
10. Separable variables
Separating the variables and integrating with respect to x gives:
3
=
y x
e dy e dx
ο² ο²
3
1
3
= +
y x
e e c
Using the laws of indices this can be written as:
3
= x y
dy
e e
dx
ο
3
1
3
= ln( + )
x
y e c
Rearrange to get π¦, by taking the natural logarithms of both
sides:
Find the particular solution to the differential equation
given that y = ln when x = 0.
3
= x y
dy
e
dx
ο
7
3
11. Separable variables
The particular solution is therefore:
Given that y = ln when x = 0:
7
3
7 1
3 3
ln = ln( + )
c
= 2
c
3
1
3
= ln( +2)
x
y e
12. Your turn
Find the particular solution to the following differential equation, where
π¦ = 8 at π₯ = 1
ππ¦
ππ₯
=
9π₯ + 6 π¦
1
3
π₯
14. To solve differential equations, we may have to
use any one ( or possibly more than one) of the
integration techniques we have learned.
β’ Integration by substitution
β’ Integration by parts
β’ Integration by partial fractions
β’ Integration with trig identities
β’
πβ²(π₯)
π(π₯)
ππ₯ = ln π π₯ + π
β’ (the formula sheet)
15. We also need to rearrange to write our answer
in the form y=f(x) unless a question tells us
otherwise.
16. Example find the general solution for :
cos(π₯)
ππ¦
ππ₯
=
π¦π₯
πππ (π₯)
1
π¦
ππ¦ =
π₯
πππ 2(π₯)
ππ₯
1
π¦
ππ¦ = π₯π ππ2π₯ππ₯
ln π¦ = π₯π‘πππ₯ β π‘πππ₯ππ₯
To solve the RHS, we must
use integration by parts
ln π¦ = π₯π‘πππ₯ β ππ sec π₯ + π
ln π¦ = π₯π‘πππ₯ + ππ cos π₯ + π
Use the power rule, to take
-1 inside the logarithm
17. Example find the general solution for :
cos(π₯)
ππ¦
ππ₯
=
π¦π₯
πππ (π₯)
ln π¦ = π₯π‘πππ₯ + ππ cos π₯ + π
π¦ = ππ₯π‘πππ₯+ππ cos π₯ +π
π¦ = ππ₯π‘πππ₯ Γ πππ cos π₯ Γ ππ
Use the laws of indices
to separate the powers.
Now ππ
, is just a
constant, so we can call
it π΄.
π¦ = π΄ cos π₯ ππ₯π‘πππ₯
This is the simplest way
to give the solution.