Problem # 1: The objective is to solve the following nonlinear equation using th
ID: 3349755 • Letter: P
Question
Problem # 1: The objective is to solve the following nonlinear equation using the Newton Raphson algorithm. Pick your own initial guess and iterate until the mismatch is les than 10. f(x) -3 Where: f(x)1.5cos(x) +10sin(x) robli # 2: to sohlowing twoar The objective is to solve the following two nonlinear equations using the Newton Raphson algorithm: f,(x,x21.5 6(X,,X2)=-0.5 Where: f(x,,x2)-x2-1.1x, cos(%) +11x, sin(%) f2(xi,x,) = 9.9x2-1.1x2 sin(%)-11x2 cos(%) Find the Jacobian Matrix Letx(o)=0,x2)=1,use the Newton Raphson algorithm to a find a solutions,, x2 such that max-1.5-f, (x,, X 1. 2. -0.5-f, (xi, x 10-5Explanation / Answer
PLEASE ENTER THE FOLLOWING COMMAND IN THE MATLAB M FILE AND THAN RUN IT
clc
clear all
x=input('please enter the intial guesss'); %TAKES THE intial guess input from the user.
n=0; %n denotes the iteration
fn=0; %this is functions intial value
dfn=0; % dfn shows differentiation of function
tol=10e-5; %tolerance
for n=1:1000 % iteration number looping
fn=3+(10*sin(x))-(1.5*cos(x)); %function
dfn=(10*cos(x))+(1.5*sin(x));
x=x-fn/dfn; %newton raphson iteration formula
if abs(fn/dfn)<tol %checks the condition when mismatch is less than 10e-5
fprintf('the final value of x is %d and this took iteration %d .',x,n);
return;
end
end
RESULT
please enter the intial guesss 0.666
the final value of x is -1.523252e-01 and this took iteration 4 .
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.