هذا مثال لطريقة الحل لانه طالبه علينا الدكتور وماقدرت احله وارجو منكم المساعدة
The following MATLAB code implement Newton-Raphson method to solve
f(x)=x sin(x)-1
==================================================

function {root, n, y, error}= Newton(po, delta, n_max)
%po the first point
%delta the tolerance
%n_max: the maximum allowed iterations

n=1;
p_new =po;
p_old =po;
error= 1;
while error > delta & n <= n_max
p_new = p_old – f(p_old) / df (p_old) ;
error = abs ((p_new – p_old) / p_new);
p_old = p_new;
n = n + 1;
end
root=p_new;
y=f(root);
end
function y=f(x)
y=x .* sin(x) –1;
end
function y=df(x)
y=sin(x) + x .* cos(x);
end
================================================== ===========
Implement the False position Algorithm for finding the roots of the following function using MATLAB
1) ln(x)-5+x = 0 , {3,4} (Note: the natural logarithm function in MATLAB is log() )

2) cos(x) + 1 – x = 0 , {0.8 , 1.6}

AS with the above code the function should return the root value, the number of iterations n , the relative error, and f(root).
- Generate a table as follows:

N
1
A
122121
C
121321
B
2121
f(c )
1212
…..






- find the root and the relative error after 10 iterations?
- How many iterations are needed to reach an error less than 10e(-10) ?

NOTE: Print and submit all your code and fill the above table till n = 6, and answer the questions.




ارجو المساعدة على حل هذا Function بثلاث طرق مختلفة لاني لم استطع الحل
وهذا قانون False position
c=b - [f(b)(b-a) / f(b)-f(a)] False position
وهذي صورة المثال


وهذا السؤال بالصوره




وجزاكم الله خير وجعله في ميزان حسناتكم