1 / 8

Roots of a Polynomial:

Roots of a Polynomial:. Root of a polynomial is the value of the independent variable at which the polynomial intersects the horizontal axis (the function has zero value) . The formulae for the roots of a 2 nd degree polynomial are given below.

joannash
Download Presentation

Roots of a Polynomial:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Roots of a Polynomial: Root of a polynomial is the value of the independent variable at which the polynomial intersects the horizontal axis (the function has zero value) . The formulae for the roots of a 2nd degree polynomial are given below The formulae for the roots of a 3rd degree polynomial are given below First root (of three)

  2. Roots of a Polynomial: >>p=[1 0 4 16 0 -20]; roots(p) All coefficients including those with zero must be specified. Otherwise the polynomial degree will be reduced. The Matlab program can be used to calculate the roots of an n degree polynomial. Example: Find the roots of the given polynomial. ans = -1.0604 + 1.0863i -1.0604 - 1.0863i 0.5207 >>p=[5 8 6 -6]; roots(p) Example: Find the roots of the given polynomial. ans = 1.0043 + 2.7517i 1.0043 - 2.7517i -1.4940 + 0.3852i -1.4940 - 0.3852i 0.9793

  3. Solutions of Nonlinear Equations: Solutions of Nonlinear Equations: f(x) Tangent line Slope at this point is f'(xi) f(xi) f(xi)-0 0 Xi+1 xi x (İnitial value) NEWTON-RAPHSON ITERATION METHOD The Newton-Raphson method, or Newton’s method, is a powerful technique for solving equations numerically. Like so much of the differential calculus, it is based on the simple idea of linear approximation. This method is a method for finding successively better approximations to the real roots (or zeroes) of a real valued function. ε (error)

  4. Solutions of Nonlinear Equations: Newton-Raphson Example 1: Find one of the θ values, which satisfies the given equation.

  5. Solutions of Nonlinear Equations: Newton-Raphson Example 2: Find one of the u values, which satisfies the given equation.

  6. Solutions of Nonlinear Equations: MATLAB CODES The following changes are made in the program (nr1.m) to solve the problems. Newton-Raphson Example 1: Newton-Raphson Example 2: clc, clear x=1;xe=0.001*x; niter=20; %---------------------------------------------- for n=1:niter %---------------------------------------------- f=x^2-4+sqrt(x+1); df=2*x+0.5/(sqrt(x+1)); %---------------------------------------------- x1=x x=x1-f/df if abs(x-x1)<xe kerr=0;break end end kerr,x clc, clear x=1;xe=0.001*x; niter=20; %---------------------------------------------- for n=1:niter %---------------------------------------------- f=5*x-cos(3*x)-1.6; df=5+3*sin(3*x); %---------------------------------------------- x1=x x=x1-f/df if abs(x-x1)<xe kerr=0;break end end kerr,x x = fzero(@(x)x^2-4+sqrt(x+1),1) x = fzero(@(x)5*x-cos(3*x)-1.6,1)

  7. Solutions of Nonlinear Equations: f1(x1,x2)=0 f2(x1,x2)=0 Newton-Raphson iteration method is used to solve the nonlinear system of equations. Since there are more than one equations and unknown variables, partial derivatives of the equations with respect to each unkown variable are used in the solution procedure. Arbitrary initial values for x1 and x2 are assigned and the iteration procedure is started by making the necessary changes in the computer program (newtonrn). The variables are stated as x() in the program. Newton-Raphson Example 3: The equation of a circle with center coordinates (3,2) and a radius 5 is given on the right hand side. How do you find the intersection point of this circle and the parabola y=x2 ?

  8. Solutions of Nonlinear Equations: y 9 (2.643, 6.987) 4 (-1.82, 3.321) 2 1 3 1 2 x The following changes are made in the program (nr.m) to solve the problem. clc, clear x=[1 4] ; fe=[0.01 0.01]; niter1=5;niter2=50; fe=transpose(abs(fe));kerr=1; for n=1:niter2 x %Error Equations--------------------------- a(1,1)=2*(x(1)-3);a(1,2)=2*(x(2)-2); a(2,1)=-2*x(1);a(2,2)=1; b(1)=-((x(1)-3)^2+(x(2)-2)^2-25); b(2)=-(x(2)-x(1)^2); %----------------------------------------------bb=transpose(b);eps=inv(a)*bb;x=x+transpose(eps); if n>niter1 if abs(eps)<fe kerr=0; break else display ('Roots are not found') end end end As shown in the figure, there are two valid solution sets. The output solution set is determined by the initial values of the unkown variables.

More Related