|
By Secant |
|
|
|
|
|
¦(x) = e–x – e–2x + 1 |
¾® |
Eexample10 |
|
|
|
¦(x) = e–2x – e–x – 1 |
التعويض |
f(x) |
|xn+1 - xn | |
النسبة
المئوية |
|
|
|
|
|
|
|
|
n |
xi-1 = قيمة افتراضية ® |
0 |
-1.0000 |
|
|
|
|
|
|
|
|
0 |
xi = قيمة افتراضية ®x1 = |
-1 |
3.6708 |
│ϵα│ |
|
|
|
|
|
|
|
|
1 |
Secant law®x2
= |
-0.21409727 |
-0.7043 |
0.7859 |
367.0774 |
¬ |
|
|
|
|
|
|
|
2 |
®x3 = |
-0.34060574 |
-0.4295 |
0.1265 |
37.1422 |
|
|
|
|
|
|
|
|
3 |
®x4 = |
-0.53839609 |
0.2220 |
0.1978 |
36.7370 |
|
|
|
|
|
|
|
|
4 |
®x5 = |
-0.47100316 |
-0.0365 |
0.0674 |
14.3084 |
|
|
|
|
|
|
|
|
5 |
®x6 = |
-0.48051421 |
-0.0025 |
0.0095 |
1.9793 |
|
Use: Goal
Seek |
Data ® What-it Analysis |
|
|
6 |
®x7 = |
-0.48122059 |
0.0000 |
0.0007 |
0.1468 |
x = |
-0.4812 |
-0.0001 |
See Example8 |
|
|
7 |
®x8 = |
-0.48121182 |
0.0000 |
0.0000 |
0.0018 |
|
|
|
|
|
8 |
®x9 = |
-0.48121183 |
0.0000 |
0.0000 |
0.0000 |
Use: MathCad |
|
|
|
9 |
®x10 = |
-0.48121183 |
0.0000 |
0.0000 |
0.0000 |
See Example8 |
|
|
|
|
|
stop because
the last two answers has been Equaled |
|
|
|
|
|
|
|
By Newton |
Other example |
|
|
|
|
|
|
|
|
|
|
¦(x) = e–2x – e–x – 1 |
قيم المشتقة |
قيم الدالة/المشتقة |
قيم (i+1)x |
Use: Maple |
|
|
|
|
|
|
|
|
x(i) |
f x(i) |
f /x(i) |
f x(i)/f /x(i) |
x(i) - fx(i)/f/x(i) |
f(x):=(e)^(-2*
x)-(e)^(-x)-1=0: |
(1) |
|
|
|
|
|
0.2 |
-1.148410707 |
-0.521909 |
2.200403 |
-2.00040268 |
solve(f(x)) |
|
|
(2) |
|
|
|
|
-2.0004026777 |
46.25010655 |
-101.892245 |
-0.453912 |
-1.54649074 |
-0.481211825 |
|
|
(3) |
|
|
|
|
-1.5464907391 |
16.34773455 |
-39.390434 |
-0.415018 |
-1.13147286 |
|
|
|
|
|
|
|
|
|
-1.1314728606 |
5.511140565 |
-16.122500 |
-0.341829 |
-0.78964371 |
|
|
|
|
|
|
-0.7896437146 |
1.648886015 |
-7.500384 |
-0.219840 |
-0.56980349 |
|
|
|
|
|
|
|
|
-0.5698034887 |
0.357620115 |
-4.483160 |
-0.079770 |
-0.49003383 |
|
|
|
|
|
|
-0.4900338333 |
0.032265095 |
-3.696902 |
-0.008728 |
-0.48130623 |
|
|
|
|
|
|
|
|
-0.4813062288 |
0.000341596 |
-3.618870 |
-0.000094 |
-0.48121184 |
|
|
|
|
|
|
|
|
|
-0.4812118360 |
3.94505E-08 |
-3.618034 |
0.000000 |
-0.48121183 |
Use: MatheMatics |
|
|
|
|
|
|
|
-0.4812118251 |
0 |
-3.618034 |
0.000000 |
-0.48121183 |
FindRoot[E^(-2
x) - E^-x - 1, {x, 0}] |
{x -> -0.4812118250596034`} |
|
|
|
stop because the last two answers has been Equaled |
{x -> -0.481212} |
ـ↑
يمكن تغير أجزاء الرقم العشري من 5 إل 16 مثلاً كما مبين هنا← |
|
|
Program in
Mthlab (Secant method) |
|
Secant for : |
¦(x)
= e–2x – e–x – 1 |
|
|
clc |
|
|
|
|
ans = |
f(x) = e–2x – e–x – 1 |
|
disp('Secant for e^(-2x)-e^(-x)-1') |
|
|
|
-1.00000000 |
|
x=[-1 0]; |
|
|
|
|
0.00000000 |
|
format long |
|
|
Resault ® |
|
-0.21409727 |
|
for
i=2:10 |
|
|
|
|
-0.72393399 |
|
fx=exp(-2*x(i-1))-exp(-x(i-1)) -1; |
القيمة عند i -1 ¾¬ |
|
-0.40349699 |
|
fxx=exp(-2*x(i))-exp(-x(i)) -1; |
القيمة عند i ¾¬ |
|
-0.46014818 |
|
x(i+1)=x(i)-((x(i)-x(i-1))*fxx)/(fxx-fx); |
القيم الجديدة i+1 ¾¬ |
|
-0.48331662 |
|
end |
|
|
|
-0.48115707 |
|
x' |
|
|
|
-0.48121168 |
|
disp('
stop because the last two answers has been
Equaled') |
|
|
-0.48121183 |
|
%----------------------------------------------------- |
|
|
|
-0.48121183 |
|
stop because
the last two answers has been Equaled |
|
|
By: Derive |
|
|
|
----------------------------------------------------------------------- |
|
|
----------------------------------------------------------------------- |
|
|
|
|
|
|
|
Program in
Mthlab (NewtonRaphson method) |
|
Newton for : |
¦(x)
= e–2x – e–x – 1 |
|
By: |
GeoGebra Ver.5 |
|
|
|
%e^(-2x)- e^(-x)-1 |
|
|
ans = |
|
|
Click on: |
Newton_Secant2.ggb |
|
|
x=[0]; |
|
|
|
-1.00000000 |
|
|
|
|
|
|
|
|
tol=0.07; |
|
|
|
-0.69561974 |
|
|
|
|
|
|
|
|
format longg |
|
|
Resault ® |
|
-0.52744619 |
|
|
|
|
|
|
|
|
for
i=1:8; |
|
|
|
|
-0.48371226 |
|
|
|
|
|
|
|
|
fx=exp(-2*x(i))- exp(-x(i))-1; |
الدالة ¾¬ |
|
-0.48121946 |
|
|
|
|
|
|
|
fxx=-2*exp(-2*x(i))+exp(-x(i)) ; |
مشتقة الدالة ¾¬ |
|
-0.48121183 |
|
|
|
|
|
|
|
|
x(i+1)=x(i)-(fx/fxx); |
القيم الجديدة ¾¬ |
|
-0.48121183 |
|
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
if abs(x(i+1)-x(i))<tol |
|
|
|
|
|
|
|
|
|
|
|
round(x',8) |
|
|
|
|
|
|
|
|
|
|
|
|
disp('stop
because the last two answers has been
Equaled') |
stop because the last two
answers has been Equaled |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|