A chemical compound decays over time when exposed to air, at a rate proportional to its concentration to the power of 2/3. At the same time, the compound is produced by
another process. The equation for its instantaneous concentration is given as
Dn(t)/dt = -0.8 * n ^(3/2) + 10 * n(o) * ( 1-e ^(-3t) )
where n(t) is the concentration at time t and n =2000 is the initial concentration at t = 0. Solve the equation from t=0 to t=0.5 using h=0.002 and Euler’s implicit method
and plot concentration versus time.
Ok, this is what I have done so far...
The function f (t, n) is : f (t, n) = ?0.8n ^(3/2) + 10 * n0(1 ?e ^(?3t) ) --------- 0 is a subscript of n
The numerical solution of the di? eqn is done incrementally:
(1) ti+1 = ti + h ------- i+1 is a subscript of t. i is a subscript of t
(2) ni+1 = ni + [?0.8*n ^(3/2) + 10n0(1 ?e ^ (?3*t(i+1) ))]h -------- (i+1) is a subscript of n and t
At each step in the iteration (2) has to be solved for ni+1. Since (2) cannot be solved explicitly, the solution has to be done numerically. To carry out the numerical solution, (2) is written in the form g (x) = 0 with x = ni+1
g (x) = x + 0.8x^(3/2) * h ? 10n0(1 ?e ^(?3ti+1))h ?ni = 0 --------------- i is a subscipt of n. i+1 is a subscript of t
g'(x) = 1 + 0.8 * (3/2) * x^(0.5) * h
another process. The equation for its instantaneous concentration is given as
Dn(t)/dt = -0.8 * n ^(3/2) + 10 * n(o) * ( 1-e ^(-3t) )
where n(t) is the concentration at time t and n =2000 is the initial concentration at t = 0. Solve the equation from t=0 to t=0.5 using h=0.002 and Euler’s implicit method
and plot concentration versus time.
Ok, this is what I have done so far...
The function f (t, n) is : f (t, n) = ?0.8n ^(3/2) + 10 * n0(1 ?e ^(?3t) ) --------- 0 is a subscript of n
The numerical solution of the di? eqn is done incrementally:
(1) ti+1 = ti + h ------- i+1 is a subscript of t. i is a subscript of t
(2) ni+1 = ni + [?0.8*n ^(3/2) + 10n0(1 ?e ^ (?3*t(i+1) ))]h -------- (i+1) is a subscript of n and t
At each step in the iteration (2) has to be solved for ni+1. Since (2) cannot be solved explicitly, the solution has to be done numerically. To carry out the numerical solution, (2) is written in the form g (x) = 0 with x = ni+1
g (x) = x + 0.8x^(3/2) * h ? 10n0(1 ?e ^(?3ti+1))h ?ni = 0 --------------- i is a subscipt of n. i+1 is a subscript of t
g'(x) = 1 + 0.8 * (3/2) * x^(0.5) * h