Applicable Mathematics 2 Examples 12. Differential equations

Applicable Mathematics 2
Examples 12. Differential equations
1.
Classify these equations (order, linearity, homogeneity (if linear), partial/ordinary)
and name the dependent and independent variables:
(a)
(c)
(e)
(g)
∂ 2f
∂x 2
d 2s
2
+y
∂f ∂f
+ sin y = 0
∂x ∂y
+ (sin t )
(b)
ds
+ (t + cos t )s = e t
dt
(d)
dt
dr
+ z2 = 0
dz
dx
= f ( t ) x + g( t )
dt
(f)
(h)
∂ 2h
+ x2h = 0
∂x∂y
∂x
∂x
+v
= uv
∂u
∂v
dx
= f (t )x
dt
y
d2x
= 2
2
dy
x −1
2.
Plot the direction field for the ODE [(dx/dt) = -2t ] at a grid spacing of 1/2 for
values of x in the range 0 – 4 and t in the range 0 – 4. Find the general solution of
this equation. If x(0) = 2, plot the particular solution (equation) passing through
this point. Check that this curve is consistent with the direction field.
3.
By inspection (trial and error), find the general solution of the ODEs:
dx
dx
d2x
= 4t 2
= 4x
= t 3 − 2t
dt
dt
dt 2
4.
Find the general solution of the differential equations:
(a)
(c)
5.
dx
= (1 + sin t ) cot x
dt
(2x + t ) dx + x + 2t = 0
dt
dx t 3 + x 3
=
dt
t
(b)
x2
(d)
dx
− 4 tx − t 3 = 0
dt
Calculate the value x(1) using Euler’s method (using step sizes of 0.2, 0.1 & 0.05)
for the following initial-value problem. Hence, estimate the exact result.
dx 4 − t
=
dt t + x
given that x(0) = 1
Answers:
Q1.
(a) 2, p, nl
(b) 2, p, l, h (c) 2, o, l, nh
(d) 1, p, l, nh
(e) 1, o, l, h (f) 1, o, l, h (g) 1, o, l, nh
(h) 2, o, nl
2
Q2.
x=2–t .
Q3.
x = C + 4t3/3,
x = Ce4t ,
x = t5/20 – t3/3 + C1t + C2
x = t (3 loge Ct )
Q4.
x = cos-1 (e(t - cos t) )
Q5.
x = {( −2 t 2 − 1)} / 8 + Ce2 t
(2.87, 2.72, 2.66, 2.60 )
2
1
3
x = {− t ± t 2 − 4( t 2 − C) } / 2
Applicable Mathematics 2
Examples 12. Differential equations – outline solutions
Q1. To answer this question, you should review the definitions of the categories. To
check your answer, you should obtain the following:
(Order, partial/ordinary, linear/non-linear, homogenous/non-homogenous)
(a) 2, p, nl
(e) 1, o, l, h
(b) 2, p, l, h
(f) 1, o, l, h
(c) 2, o, l, nh (d) 1, p, l, nh
(g) 1, o, l, nh (h) 2, o, nl
Q2. First part involves plotting the direction field.
Second part: (dx/dt) = -2t. The solution is (obviously ?) x = C - t2
To obtain the particular solution, substitute ( x = 2 at t = 0)
This gives: C = 2, i.e., x = 2 – t2.
Q3. Experience helps in solving these types of questions. In all cases, check that the
solution satisfies the ODE by substitution:
dx
= 4t 2
dt
This is very simple: x = C + 4t3/3
dx
= 4x
dt
A bit more difficult: x = Ce4t
d2x
dt
2
= t 3 − 2t
Much like the first: x = t5/20 – t3/3 + C1t + C2
Q4. The first step in each case is to spot what type of differential equation it is.
(a)
dx
= (1 + sin t ) cot x
dt
This is separable. The solution is:
∫ tan xdx = ∫ (1 + sin t )dt
These are standard integrals. This leads to: x = cos-1 (e(t - cos t) )
(b) x 2
dx t 3 + x 3
=
dt
t
dx / dt = (t2/x2 ) + (x/t)
First, rewrite this as:
This is separable, if we substitute y = x/t, which gives:
dx/dt = y -2 + y
Since:
x= ty
dx/dt = y + t (dy/dt)
Equating the two expressions for dx/dt, we obtain:
y + t (dy/dt) = y -2 + y
This is separable in y and t
Hence:
∫ y dy = ∫
2
dt
t
These are standard forms. You should end up with:
x = t (3 loge Ct )
1
3
(c) (2 x + t )
dx
+ x + 2t = 0
dt
This is an exact form, since (2x + t)t = (x+2t)x . (They are both equal to 1)
Thus, there is some function f such that fx = 2x + t and ft = x+2t
Hence:
f = ∫ f x dx = x 2 + tx + g( t )
= ∫ f t dt = xt + t 2 + h ( x )
Thus: f = x2 + t2 + xt + C1
The solution is: f = constant. Hence:
x=
(d)
− t ± t 2 − 4( t 2 − C )
2
dx
− 4 tx − t 3 = 0
dt
This is a linear equation, without an obvious solution.
The ‘integrating factor’ is:
e∫
− 4 tdt
= e− 2 t
2
The right-hand-side is: +t3.
The solution is therefore:
x = e +2 t [ ∫ e −2 t t 3dt + C]
2
2
2
Try the substitution y = t , noting the standard form:
You should get:
2
1
x = ( −2 t 2 − 1) + Ce2 t
8
eay
∫ ye dy = a 2 (ay − 1)
ay
Q5.
dx 4 − t
=
dt t + x
given that x(0) = 1
Euler’s method: xn+1 = xn + hF
Find x(1)
[ where F = (dx/dt) ]
Consider the case with h = 0.2
t
0
.2
.4
.6
.8
1.0
x
1
1.8
2.18
2.459
2.681
2.865
4-t
4
3.8
3.6
3.4
3.2
t+x
1
2
2.58
3.059
3.481
F
4
1.9
1.395
1.111
0.919
hf
.8
.38
.279
.222
.184
So our first estimate of x(1) is 2.865
(In this case, I only carried the calculations to three or four decimal places.
For smaller increments, it would be necessary to retain more decimal digits.)
Repeating the calculations for h = 0.1 & 0.05 yields 2.72 & 2.66, respectively.
We expect that halving the step-size halves (approxm ) the error. (Which means that the
difference ∆12 between the first and second solution should be equal to the difference
between the second solution and the true solution.)
∆12 = 2.87 – 2.72 = .15
Therefore, true solution ≈ 2.57
Applying this logic to the second and third solutions, we obtain:
∆23 = 2.72 – 2.66 = .06
Therefore, true solution ≈ 2.60
Our second estimate of the true solution will be more accurate – so we conclude that the
true solution is approxm 2.60 (Actually, it is 2.604 to three decimal places)