%type the following function in matlab to get the result
for solving
%polynomial using newton raphson method
function root=find_root(coef)
len=length(coef); %number of coefficients of
polynomial.
x=100; % initial guess
error=inf;
while(error>0.00001) %precision llimit
y=0;
ydif=0;
for n=0:len-1
y=y+coef(len-n)*x^n; %calculating polynomial value
ydif=ydif+n*coef(len-n)*x^(n-1); %calculate derivative value
end
error=y/ydif; %error caluclation
x=x-y/ydif; %updated value
end
fprintf('value of root x for polymonimal is x=%d',x);
x
for example
If you want to find a root of
f(x)=12x^3+8x^2-3x^1+88,
write the command window of matlab as calling the function
-
find_root([88 -3 8 12]);
hence you see the root is -0.6735 for the assumed ploynomial...
similarly you can test for other polynomial by varying coeffiect of any degree of polynomial and also change the error precision to vary the accuracy of the result.
good luck.
The Gauss-Seidel method is also known as the method of successive displacements. To illustrate th...
Problem 12.12
Pls show the m-file
Develop your own M-file function for the Gauss-Seidel method without relaxation based on Fig. 12.2, but change the first line so that it returns the approximate error and the number of iterations: function [x, ea, iter] = ... GaussSeidel (, b, es, maxit) Test it by duplicating Example 12.1 and then use it to solve Prob. 12.2a. Develop your own M-file function for Gauss-Seidel with relaxation. Here is the function's first line: function [x,...
Using kcl find the values of I1, I2, I3
Q1: Form a linear system of cquations for the given below circuit using basic laws of electrical enginecring. Also find the numerical solution of developed system by using Gauss-Seidal's iterative method. (CLO2) (10) 1-12 2-12- 13 5 Ohms J1 2 Ohms 2 Ohms J2 I31 2 V 61 hms 80 ms 5 hms 3 Ohms 4 V -12 8V 1-12-13 Q2: Find the solution (real root) for the following non-linear equation...
Newton's Method Derivation (20 pts) Derive Newton's method, also known as Newton- Raphson method, starting from Taylor Series. (a) Write the first order Taylor series expansion for f (x) about xo. We will call this polynomial To(x). Define your step as (xı - xo) (b) What kind of curve is To(x) (line, parabola, cubic, ...)? (c) Solve for the root of To(x). This will give you x1. If you're not sure what to do (d) Repeat the steps above but...
First, read the article on "The Delphi Method for Graduate Research." ------ Article is posted below Include each of the following in your answer (if applicable – explain in a paragraph) Research problem: what do you want to solve using Delphi? Sample: who will participate and why? (answer in 5 -10 sentences) Round one questionnaire: include 5 hypothetical questions you would like to ask Discuss: what are possible outcomes of the findings from your study? Hint: this is the conclusion....