Information Technology Reference
In-Depth Information
(d) Use Simpson's scheme to motivate
f.
u
nC1
/
C
4f
1
2
.
u
nC1
C
u
n
/
C
f.
u
n
/
:
t
6
u
nC1
D
u
n
C
(2.61)
(e) Implement the schemes given by (
2.59
)-(
2.61
). Use problem (
2.38
) to check the
accuracy of the schemes.
˘
Exercise 2.8.
Differential equations of the form
dy
dt
g.t/
f.y/
D
(2.62)
are called separable. Such equations can often be solved by direct integration.
Suppose that f and y have anti-derivatives given by F and G, i.e.,
F.y/
D
Z
f.y/
dy
(2.63)
and
G.t/
D
Z
g.t/
dt
:
(2.64)
Then the solution of (
2.62
) satisfies
F.y/
D
G.t/
C
c;
(2.65)
where c is a constant that has to be determined using the initial condition.
(a) Consider
y
0
D
y;
y.0/
D
1:
(2.66)
Use the method above to solve this problem. Verify your answer by checking
that both conditions in (
2.66
) hold.
(b) Consider
y
0
D
y
2
;
y.0/
D
˛:
(2.67)
Use the method above to solve (
2.67
). Verify that the solutions provided in
Examples
2.4
and
2.5
are correct.