English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

e^x = 4 - 2x
*note: the stuff inside [brackets] indicates "sub" for example: x[n+1] --> x(sub)n+1

I got as far as x[n+1] = x[n] - ( ln(4-2x) / ((-2 / (4-2x[n])) - 1 )

I'm not even sure if that's correct either. I've been using x[1] = 1 as the starting point and after calculating up to around x[6] or so, I always end up with 1.499999 or 1.500000, which are both wrong answers.

Can anyone tell me where I'm messing up?

2007-10-30 15:49:46 · 5 answers · asked by enhancedbycolor 2 in Science & Mathematics Mathematics

5 answers

e^x = 4 - 2x
e^x + 2x - 4 = 0

Let f(x) = e^x + 2x - 4
So, f ' (x) = e^x + 2

Formula is : x[n+1) = x[n] - (e^x[n] + 2x[n] - 4) / (e^x[n] + 2)

Let n = 0 and let x[0] = 1

Therefore, x[1] = 1 - (e^1 + 2*1 - 4) / (e^1 + 2) = 0.84776625

x[2] = 0.840854379
x[3] = 0.840841495
x[4] = 0.840841495

To 6 decimal places, this is 0.840841.

2007-10-30 16:21:21 · answer #1 · answered by falzoon 7 · 1 0

1. define f(x) = e^x -4 + 2x (=0)
2. compute derivative, df(x)/dx; call this J(x)
3. define the recursion, x(n+1) = x(n) - a*f(x(n)) / J(x(n))
4. start out with x(0) = 1 (or x(0) = 0)
5. start with a=1; if it does not converge, try a=0.5; if that too
doesn't converge, try a=0.1
6. stop when |f(x(n))| drops below a tolerance

2007-10-30 16:11:43 · answer #2 · answered by noitall 5 · 0 0

Find All Roots

2016-10-20 07:04:56 · answer #3 · answered by buhs 4 · 0 0

e^x = 4 - 2x

f(x) =e^x +2x -4 =0
f'(x) = e^x +2

start with x[1] =1
x[2] = x[1] -f[1]/f '[1]
x[2] = 1-(e +2 -4)/(e +2) = 1 -(e-2)/(e+2) =
= 0.85
x[3] = x[2] - f[2]/f ' [2] =
x[3] = 0.85 - (2.34+1.7 -4)/(2.34 +2)=
x[3] = 0.84

if i stop here:
f(0.84) = e^(0.84) +2(0.84) -4 = -0.0038 ( close to 0)
one or 2 more iterations will give you the solution.

Good luck !!!!!!

2007-10-30 16:13:39 · answer #4 · answered by Anonymous · 0 1

Your iteration formula is all wrong.
Recall that Newton's formula gives
x[n+1] = x[n] - f(x[n]) / f'(x[n]).
So
x[n+1] = x[n] - (e^x[n] + 2x[n] -4) / (e^x[n] + 2)
Now iterate this and see what happens.

2007-10-30 16:07:49 · answer #5 · answered by steiner1745 7 · 1 1

fedest.com, questions and answers