# Tutorial 5 - 2010 - Solution/Question 3

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 ← Question 2 (previous step) Back to all questions Next step: Question 4 →

<rst> <rst-options: 'toc' = False/> <rst-options: 'reset-figures' = False/>

Question 3 [1]

###### ==
1. . Write the Newton-Raphson iteration formula that you would use to solve this nonlinear equation.
2. . Apply 3 iterations of this formula, also starting from :math:T = 380 K, and calculate the error tolerances.

Solution

1. . The Newton-Raphson algorithm is given on slide 15-17 of the *Section C: Nonlinear Algebraic Equations* slide set.

To apply the Newton-Raphson method we must first calculate the derivative of our function:

.. math::

f'(T) = - 0.26 + 3.38\text{x}10^{-3}T - \frac{1.5\text{x}10^{5}}{T^{2}}

Therefore the Newton-Raphson iteration formula we use is the following:

.. math::

T^{(k+1)} = T^{(k)} - \frac{f(T^{(k)})}{f'(T^{(k)})} = T^{(k)} - \frac{- 24097 - 0.26T + 1.69\text{x}10^{-3}T^{2} + \frac{1.5\text{x}10^{5}}{T} - (-23505)}{- 0.26 + 3.38\text{x}10^{-3}T - \frac{1.5\text{x}10^{5}}{T^{2}}}

1. .

We start with :math:T^{(0)} = 380 K:

.. math::

\begin{array}{rl} \Delta H_{r}^{0}\left(T^{(0)}\right) &= - 24097 - 0.26\left(T^{(0)}\right) + 1.69\text{x}10^{-3}\left(T^{(0)}\right)^{2} + \frac{1.5\text{x}10^{5}}{\left(T^{(0)}\right)}\\ \Delta H_{r}^{0}\left(T^{(0)}\right) &= - 24097 - 0.26\left(380\right) + 1.69\text{x}10^{-3}\left(380\right)^{2} + \frac{1.5\text{x}10^{5}}{\left(380\right)}\\ \Delta H_{r}^{0}\left(T^{(0)}\right) &= -23557.02715 \end{array}

*ITERATION 1*

.. math::

\begin{array}{rl} T^{(1)} &= T^{(0)} - \frac{- 24097 - 0.26T^{(0)} + 1.69\text{x}10^{-3}(T^{(0)})^{2} + \frac{1.5\text{x}10^{5}}{T^{(0)}} - (-23505)}{- 0.26 + 3.38\text{x}10^{-3}T^{(0)} - \frac{1.5\text{x}10^{5}}{(T^{(0)})^{2}}}\\ T^{(1)} &= (380) - \frac{- 24097 - 0.26(380) + 1.69\text{x}10^{-3}(380)^{2} + \frac{1.5\text{x}10^{5}}{(380)} - (-23505)}{- 0.26 + 3.38\text{x}10^{-3}(380) - \frac{1.5\text{x}10^{5}}{(380)^{2}}}\\ T^{(1)} &= -3237.72940\\ & \\ \Delta H_{r}^{0}\left(T^{(1)}\right) &= - 24097 - 0.26\left(T^{(1)}\right) + 1.69\text{x}10^{-3}\left(T^{(1)}\right)^{2} + \frac{1.5\text{x}10^{5}}{\left(T^{(1)}\right)}\\ \Delta H_{r}^{0}\left(T^{(1)}\right) &= - 24097 - 0.26\left(-3237.72940\right) + 1.69\text{x}10^{-3}\left(-3237.72940\right)^{2} + \frac{1.5\text{x}10^{5}}{\left(-3237.72940\right)}\\ \Delta H_{r}^{0}\left(T^{(1)}\right) &= -5585.4322 \end{array}

.. math::

\begin{array}{rl} \epsilon_{tol,x}^{(1)} &= \left| \frac{T^{(1)}-T^{(0)}}{T^{(0)}} \right| < \epsilon_{tol} ? \\ \epsilon_{tol,x}^{(1)} &= \left| \frac{\left(-3237.72940\right)-\left(380\right)}{\left(380\right)} \right| < \left(10^{-6}\right) ? \\ \epsilon_{tol,x}^{(1)} &= 9.52 < \left(10^{-6}\right) ? \;\; \rightarrow \;\; \text{No, therefore keep going}. \\ & \\ \epsilon_{tol,f}^{(1)} &= \left| \frac{\Delta H_{r}^{0}\left(T^{(1)}\right)-\Delta H_{r}^{0}\left(T^{(0)}\right)}{\Delta H_{r}^{0}\left(T^{(0)}\right)} \right| < \epsilon_{tol} ? \\ \epsilon_{tol,f}^{(1)} &= \left| \frac{\left(-5585.4322\right)-\left(-23557.02715\right)}{\left(-23557.02715\right)} \right| < \left(10^{-6}\right) ? \\ \epsilon_{tol,f}^{(1)} &= 0.763 < \left(10^{-6}\right) ? \;\; \rightarrow \;\; \text{No, therefore keep going}. \end{array}

*ITERATION 2*

.. math::

\begin{array}{rl} T^{(2)} &= T^{(1)} - \frac{- 24097 - 0.26T^{(1)} + 1.69\text{x}10^{-3}(T^{(1)})^{2} + \frac{1.5\text{x}10^{5}}{T^{(1)}} - (-23505)}{- 0.26 + 3.38\text{x}10^{-3}T^{(1)} - \frac{1.5\text{x}10^{5}}{(T^{(1)})^{2}}}\\ T^{(2)} &= (-3237.72940) - \frac{- 24097 - 0.26(-3237.72940) + 1.69\text{x}10^{-3}(-3237.72940)^{2} + \frac{1.5\text{x}10^{5}}{(-3237.72940)} - (-23505)}{- 0.26 + 3.38\text{x}10^{-3}(-3237.72940) - \frac{1.5\text{x}10^{5}}{(-3237.72940)^{2}}}\\ T^{(2)} &= -1640.311\\ & \\ \Delta H_{r}^{0}\left(T^{(2)}\right) &= - 24097 - 0.26\left(T^{(2)}\right) + 1.69\text{x}10^{-3}\left(T^{(2)}\right)^{2} + \frac{1.5\text{x}10^{5}}{\left(T^{(2)}\right)}\\ \Delta H_{r}^{0}\left(T^{(2)}\right) &= - 24097 - 0.26\left(-1640.311\right) + 1.69\text{x}10^{-3}\left(-1640.311\right)^{2} + \frac{1.5\text{x}10^{5}}{\left(-1640.311\right)}\\ \Delta H_{r}^{0}\left(T^{(2)}\right) &= -19214.81711 \end{array}

.. math::

\begin{array}{rl} \epsilon_{tol,x}^{(2)} &= \left| \frac{T^{(2)}-T^{(1)}}{T^{(1)}} \right| < \epsilon_{tol} ? \\ \epsilon_{tol,x}^{(2)} &= \left| \frac{\left(-1640.311\right)-\left(-3237.72940\right)}{\left(-3237.72940\right)} \right| < \left(10^{-6}\right) ? \\ \epsilon_{tol,x}^{(2)} &= 0.493 < \left(10^{-6}\right) ? \;\; \rightarrow \;\; \text{No, therefore keep going}. \\ & \\ \epsilon_{tol,f}^{(2)} &= \left| \frac{\Delta H_{r}^{0}\left(T^{(2)}\right)-\Delta H_{r}^{0}\left(T^{(1)}\right)}{\Delta H_{r}^{0}\left(T^{(1)}\right)} \right| < \epsilon_{tol} ? \\ \epsilon_{tol,f}^{(2)} &= \left| \frac{\left(-19214.81711\right)-\left(-5585.4322\right)}{\left(-5585.4322\right)} \right| < \left(10^{-6}\right) ? \\ \epsilon_{tol,f}^{(1)} &= 2.44 < \left(10^{-6}\right) ? \;\; \rightarrow \;\; \text{No, therefore keep going}. \end{array}

*ITERATION 3*

.. math::

\begin{array}{rl} T^{(3)} &= T^{(2)} - \frac{- 24097 - 0.26T^{(2)} + 1.69\text{x}10^{-3}(T^{(2)})^{2} + \frac{1.5\text{x}10^{5}}{T^{(2)}} - (-23505)}{- 0.26 + 3.38\text{x}10^{-3}T^{(2)} - \frac{1.5\text{x}10^{5}}{(T^{(2)})^{2}}}\\ T^{(3)} &= (-1640.311) - \frac{- 24097 - 0.26(-1640.311) + 1.69\text{x}10^{-3}(-1640.311)^{2} + \frac{1.5\text{x}10^{5}}{(-1640.311)} - (-23505)}{- 0.26 + 3.38\text{x}10^{-3}(-1640.311) - \frac{1.5\text{x}10^{5}}{(-1640.311)^{2}}}\\ T^{(3)} &= -908.1982\\ & \\ \Delta H_{r}^{0}\left(T^{(3)}\right) &= - 24097 - 0.26\left(T^{(3)}\right) + 1.69\text{x}10^{-3}\left(T^{(3)}\right)^{2} + \frac{1.5\text{x}10^{5}}{\left(T^{(3)}\right)}\\ \Delta H_{r}^{0}\left(T^{(3)}\right) &= - 24097 - 0.26\left(-908.1982\right) + 1.69\text{x}10^{-3}\left(-908.1982\right)^{2} + \frac{1.5\text{x}10^{5}}{\left(-908.1982\right)}\\ \Delta H_{r}^{0}\left(T^{(3)}\right) &= -22632.0781 \end{array}

.. math::

\begin{array}{rl} \epsilon_{tol,x}^{(3)} &= \left| \frac{T^{(3)}-T^{(2)}}{T^{(2)}} \right| < \epsilon_{tol} ? \\ \epsilon_{tol,x}^{(3)} &= \left| \frac{\left(-908.1982\right)-\left(-1640.311\right)}{\left(-1640.311\right)} \right| < \left(10^{-6}\right) ? \\ \epsilon_{tol,x}^{(3)} &= 0.45 < \left(10^{-6}\right) ? \;\; \rightarrow \;\; \text{No, therefore keep going}. \\ & \\ \epsilon_{tol,f}^{(3)} &= \left| \frac{\Delta H_{r}^{0}\left(T^{(3)}\right)-\Delta H_{r}^{0}\left(T^{(2)}\right)}{\Delta H_{r}^{0}\left(T^{(2)}\right)} \right| < \epsilon_{tol} ? \\ \epsilon_{tol,f}^{(3)} &= \left| \frac{\left(-22632.0781\right)-\left(-19214.81711\right)}{\left(-19214.81711\right)} \right| < \left(10^{-6}\right) ? \\ \epsilon_{tol,f}^{(3)} &= 0.178 < \left(10^{-6}\right) ? \;\; \rightarrow \;\; \text{No, therefore keep going}. \end{array}

</rst>