Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

$$\begin{align} (1/300)a + (-1/200)b &= 5\\ (-1/300)a + ((-1/300) + (1/200))b + (-1/200)c &= -e^b\\ (-1/200)b + (1/200)c &= -e^c \end{align} $$ how do I solve for $a, b$ and $c$? Thanks!

I know if I derive an equation that isolates a variable, like $kx + e^x = 0$ I can use Newton's method to approximate x. But still can't figure it out.

(I am just a high school student - so if you can make your answers as easy to understand as possible)

share|improve this question
    
Newton's method also works for systems, as you can read here, for example. –  martini Oct 10 '11 at 15:57

2 Answers 2

Your system

$$\left\{ \begin{array}{c} \frac{1}{300}a-\frac{1}{200}b=5 \\ -\frac{1}{300}a+\left( -\frac{1}{300}+\frac{1}{200}\right) b-\frac{1}{200} c=-e^{b} \\ -\frac{1}{200}b+\frac{1}{200}c=-e^{c}\tag{1} \end{array} \right. $$

is equivalent to

$$\left\{ \begin{array}{c} 2a-3b=3000 \\ -2a+b-3c=-600e^{b} \\ -b+c=-200e^{c}\tag{2} \end{array} \right. $$

and to

$$\left\{ \begin{array}{c} a=\frac{3}{2}\left( c+200e^{c}\right) +1500 \\ -5c-400e^{c}-3000+600\text{ exp}(c+200e^{c})=0 \\ \tag{3} b=c+200e^{c}. \end{array} \right. $$

The second equation has two solutions (computation in WolframAlpha): $c\approx -600.000$ and $c\approx -3.64058$.

The Newton's method applied to $$f(c)=-5c-400e^{c}-3000+600\text{ exp}(c+200e^{c})\tag{4}$$

consists of the following iterations

$$c_{k+1}=c_{k}-\frac{f(c_{k})}{f^{\prime }(c_{k})},\qquad k=1,2,\dots\tag{5}$$

with

$$f'(c)=-5-400e^{c}+600\left( 1+200e^{c}\right) \text{ exp}(c+200e^{c})\tag{6}$$

Starting with e.g. $c_{1}=-500$, we get $$ \begin{eqnarray*} f(c_{1}) &=&-5c_{1}-400e^{c_{1}}-3000+600\text{ exp}(c_{1}+200e^{c_{1}}) \\ f(-500) &=&5\times 500-400e^{-500}-3000+600\text{ exp}(-500+200e^{-500}) \\ &\approx &-500.0 \end{eqnarray*}$$

and $$ \begin{eqnarray*} f^{\prime }(c_{1}) &=&-5-400e^{c_{1}}+600\left( 1+200e^{c_{1}}\right) \text{ exp}(c_{1}+200e^{c_{1}}) \\ f^{\prime }(-500) &=&-5-400e^{-500}+600\left( 1+200e^{-500}\right) \text{ exp}(-500+200e^{-500}) \\ &\approx &-5.0. \end{eqnarray*}$$

And so, $$ c_{2}=c_{1}-\frac{f(c_{1})}{f^{\prime }(c_{1})}\approx -500-\frac{-500.0}{ -5.0}\approx -600.0, $$

which is already a good approximation.

For $c_{1}=-3.6$, we get successively $$\begin{eqnarray*} c_{2} &\approx &-3.6-\frac{879.64}{25019.0}\approx -3.6352 \\ c_{3} &\approx &-3.6352-\frac{71.578}{19406.}\approx -3.6389 \\ c_{4} &\approx &-3.6389-\frac{1.\,417\,3}{18902.}\approx -3.6390 \\ c_{5} &\approx &-3.6390-\frac{29.\,615}{18889.}\approx -3.6406 \\ c_{6} &\approx &-3.6406-\frac{-0.435\,93}{18676}\approx -3.6406. \end{eqnarray*}$$

From $(3)$ for $c\approx -3.6406$, we get the solution $(a,b,c)\approx (1502.4,1.6067,-3.6406)$ and for $c\approx -600.0$ the solution $(a,b,c)\approx (600.0,-600.0,-600.0)$.

enter image description here

Plot of $f(c)$ for $c=-700$ to $c=-3.62$

enter image description here

Plot of $f(c)$ for $c=-3.7$ to $c=-3.6$


Added: You have perhaps in mind the general method for solving a nonlinear system, applied to the present case. Let's denote $x_{1}=a,x_{2}=b,x_{3}=c$. The system

$$ \begin{pmatrix} f_{1}(x_{1},x_{2},x_{3}) \\ f_{2}(x_{1},x_{2},x_{3}) \\ f_{3}(x_{1},x_{2},x_{3}) \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix},\tag{7}$$

where

$$ \begin{pmatrix} f_{1}(x_{1},x_{2},x_{3}) \\ f_{2}(x_{1},x_{2},x_{3}) \\ f_{3}(x_{1},x_{2},x_{3}) \end{pmatrix} = \begin{pmatrix} \frac{1}{300}x_{1}-\frac{1}{200}x_{2}-5 \\ -\frac{1}{300}x_{1}+\left( -\frac{1}{300}+\frac{1}{200}\right) x_{2}-\frac{1 }{200}x_{3}+e^{x_{2}} \\ -\frac{1}{200}x_{2}+\frac{1}{200}x_{3}+e^{x_{3}} \end{pmatrix},\tag{8}$$

has the Jacobian matrix

$$\begin{eqnarray*} J\left( x\right) &=& \begin{pmatrix} \frac{\partial f_{1}(x_{1},x_{2},x_{3})}{\partial x_{1}} & \frac{\partial f_{1}(x_{1},x_{2},x_{3})}{\partial x_{2}} & \frac{\partial f_{1}(x_{1},x_{2},x_{3})}{\partial x_{3}} \\ \frac{\partial f_{2}(x_{1},x_{2},x_{3})}{\partial x_{1}} & \frac{\partial f_{2}(x_{1},x_{2},x_{3})}{\partial x_{2}} & \frac{\partial f_{2}(x_{1},x_{2},x_{3})}{\partial x_{3}} \\ \frac{\partial f_{3}(x_{1},x_{2},x_{3})}{\partial x_{1}} & \frac{\partial f_{3}(x_{1},x_{2},x_{3})}{\partial x_{2}} & \frac{\partial f_{3}(x_{1},x_{2},x_{3})}{\partial x_{3}} \end{pmatrix} \\ &=& \begin{pmatrix} \frac{1}{300} & -\frac{1}{200} & 0 \\ -\frac{1}{300} & \frac{1}{600}+e^{x_{2}} & -\frac{1}{200} \\ 0 & -\frac{1}{200} & \frac{1}{200}+e^{x_{3}} \end{pmatrix} . \end{eqnarray*}\tag{9} $$

The Newton's method consists of starting with an approximation $x^{(1)}$ and find successively

$$x^{(k+1)}=x^{(k)}+\Delta x^{(k)},\qquad k=1,2,\dots\tag{10}$$

where $\Delta x^{(k)}$ is a solution of

$$J\left( x^{(k)}\right) \Delta x^{(k)}=-f\left( x^{(k)}\right) ,\tag{11}$$

which can be found by Gaussian elimination.

Notation: $x^{(k)}$ is the vector $\left( x_{1}^{(k)},x_{2}^{(k)},x_{3}^{(k)}\right) ^{T}$, $x^{(k+1)}$ is the vector $% \left( x_{1}^{(k+1)},x_{2}^{(k+1)},x_{3}^{(k+1)}\right) ^{T}$, $J\left( x^{(k)}\right) $ is the Jacobian matrix evaluated at $\left( x_{1}^{(k)},x_{2}^{(k)},x_{3}^{(k)}\right) $ and $f\left( x^{(k)}\right)$ is the vector column $(8)$ of $f$ evaluated at $\left( x_{1}^{(k)},x_{2}^{(k)},x_{3}^{(k)}\right) $.

share|improve this answer

The first equation is used to substitute all $a \rightarrow \frac{3}{2}b+1500$. The two remaining equations can be collected into a 2x1 vector $f = 0$

$$f = \begin{pmatrix} \hat{e}^b-\frac{b}{300}-\frac{c}{200}-5 \\ \hat{e}^c-\frac{b}{200}+\frac{c}{200} \end{pmatrix} $$

The derivatives with respect to $b$ and $c$ for each part are

$$ f\,' = \begin{pmatrix} \hat{e}^b-\frac{1}{300} & -\frac{1}{200} \\ -\frac{1}{200} & \hat{e}^c+\frac{1}{200} \end{pmatrix} $$

Newton raphson with vectors is $ (b,c) \rightarrow (b,c) - {f\,'}^{-1} f $

$$ \begin{pmatrix}b\\c\end{pmatrix} \rightarrow \begin{pmatrix}b\\c\end{pmatrix} - \begin{pmatrix} \hat{e}^b-\frac{1}{300} & -\frac{1}{200} \\ -\frac{1}{200} & \hat{e}^c+\frac{1}{200} \end{pmatrix}^{-1} \begin{pmatrix} \hat{e}^b-\frac{b}{300}-\frac{c}{200}-5 \\ \hat{e}^c-\frac{b}{200}+\frac{c}{200} \end{pmatrix} $$

with an initial guess of $\begin{pmatrix}b = 1\\c = 1 \end{pmatrix} $ I get the following iterations

$$ \begin{bmatrix} 1&1\\1.841661&0.003381327\\1.634514&-0.9835724\\1.608907&-1.936174\\1.607725&-2.783955\\1.607126&-3.380392 \end{bmatrix} $$

So in the end we have $ a= \frac{3}{2} 1.607126 + 1500 $, $ b = 1.607126 $, $ c = -3.380392 $.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.