Académique Documents
Professionnel Documents
Culture Documents
Analytical Solution vs. Numerical Solution
Analytic Solution (a.k.a. symbolic solution): The exact numerical or symbolic representation of the
solution
may use special characters such as , e, or tan (83)
Numerical Solution: The computational representation of the solution
entirely numerical
Examples:
(Analytic Solution) (Numerical Solution)
1/4, 1/3, , tan(83) 0.25, 0.3333, 3.14159, 0.88472,
II. ANALYTIC/SYMBOLIC CALCULATION
SAMPLE PROBLEM OF DIFFERENTIAL EQUATION:
A 200 gallon tank is full of pure water. Let pure water run into the tank at the rate of 2 gals/ min. and a
brine (or salt water) solution containing 0.5 lb/gal. of salt run in at the rate of 2 gals/min. The mixture
flows out of the tank through an outlet tube at the rate of 4 gals/min. Assuming perfect mixing, (1.) what
is the amount of salt in the tank after t minutes? (2.) What is the amount of salt in 0.2 minute?
Solution:
Let s be the amount of salt in the tank in pounds at time t. Then:
s/ 200 = concentration of salt (i.e. as a proportion of total gallons of pure water in tank initially)
Then: ds/ dt = net rate of change = (rate of gain in lbs/min - rate of loss in lbs/min)
ds/dt = [(2gal/min)(0.5lb./gal)] [(4gal./min)(s/200)]
We can further write:
ds/dt = 1 - 4s/ 200
ds/dt = 1 - s/50
ds/dt =
Writing the basic differential equation to solve:
ds/ (50 - s) = dt/50 recall the integral calculus formula :
2
This requires integrating both sides:
Note: Definite integral is an integration of function between two points, thus, no need for any
unknown constant term (constant cancels out)
Note the integration is taken from 0 to s on the left side and from 0 to t on the right. This leads to:
ln(50 s)
= -
Yields to:
ln(50 s) - ln(50-0) = -
ln(50 s) - ln(50) = -
) = -
50-s = 50
s = 50 - 50
s = 50(1-
)
3
NUMERICAL METHOD FOR SOLVING DIFFERENTIAL EQUATIONS:
1. RungeKutta Methods
These techniques were developed around 1900 by the German mathematicians C. Runge and M.
W. Kutta
2. Eulers Methods
The Euler method is named after Leonhard Euler, who treated it in his book Institutionum calculi
integralis (published 176870)
1. RungeKutta Methods (fourth order)
Let an initial value problem be specified as follows:
y = (x, y)
y(xo) = yo (initial value or boundary condition from a given problem)
h = Step size
1 = h (xi, yi)
2 = h (xi +
, yi
)
3 = h (xi +
, yi
)
4 = h (xi +, yi+k3)
y(xo + h) = yi +
From the given problem, solve for the amount of salt in 0.2 minute? or What is s=? (in lb.) at 0.2 minute?
Differential Equation: ds/ (50 - s) = dt/50
2 = h (to +
, so
3 = h (to +
, so
4 = h (to +, so+k3) = (0.1, 0.0999) =0.1 x
s(to + h) = s0 +
s(0.1) = 0 +
( )
s1 = (Numerical Solution)
while the Exact Solution is equals to:
s = 50(1-
) = 50(1-
2 = h (t1 +
, s1
4
3 = h (t1 +
, s1
4 = h (t1 +, s1+k3) = h (0.2, 0.199601) =0.1 x
s(t1 +h) = s1 +
s(0.2) = 0.0999 +
( )
s2 = (Numerical Solution)
while the Exact Solution is equals to:
s = 50(1-
) = 50(1-
,
t0 = 0, s0=0
t1=0.1 minute, s1 =?
t1 = t0 + h
t1 = 0 + 0.1 = 0.1
s1 = s0+ hf(t0, s0)
s1 = 0+ 0.1 f(0, 0) = 0 + 0.1 x (
= 0.1
Summarizing the second point in our numerical solution:
If t1=0.1 minute, s1 =0.10 lb.
t1 = .1, s1=0.1
t2=0.2 minute, s2 =?
t2 = t1 + h
t2 = 0.1 + 0.1 = 0.2
s2 = s1+ hf(t1, s1)
s2 = 0.1+ 0.1 f(0.1, 0.1) = 0.1 + 0.1 x (
= 0.1998
Summarizing the second point in our numerical solution:
If t1=0.2 minute, s2 =0.1998 lb.
Difference = |0.199601-0.1998| = 0.000199 lb.
THANK YOU FOR LISTENING.. GOD BLESS YOU..