Function [x,niter]=gausseidel(A,b,e,N,x0) n=length(b); x=x0; xk=x0; for niter=1:N for i=1:n; Sum1=A(i,1:i-1)*x(1:i-1); Sum2=A(i,i+1:n)*xk(i+1:n); x(i)=(1/A(i,i))*(b(i)-Sum1-Sum2);

Slides:



Advertisements
Similar presentations
We can think of numbers being on a number line: These numbers are all positive numbers.
Advertisements

What is the sum of the following infinite series 1+x+x2+x3+…xn… where 0
XkFKP0KP01KP012K X0F0... X1F1P01.. X2F2P02P012. X3F3P03P013P0123 P0,...,k+1(x) = (x−xk)P0,...,k−1,k+1(x)−(x−xk+1)P0,...,k(x) _______________________________________________________.
Solving systems of equations with 2 variables Word problems (Number Problems)
REVIEW for TEST Parallel and Perpendicular Solving Systems of Equations.
Geometry 11.2 Big Idea: Compute Areas of Trapezoids, Rhombuses and Kites.
Applications of Consecutive Integers
EXAMPLE 1 Finding a Mean Geysers Over a span of 12 hours, Old Faithful Geyser in Yellowstone National Park erupted 10 times. The lengths (in minutes) of.
Do Now. Homework Solutions 1)c 2 – 26c – 56 = 0 (c – 28)(c + 2) = 0 {-2, 28} 2)n 2 + 4n – 32 = 0 (n + 8)(n – 4) = 0 {-8, 4} 3)h 2 + 2h – 35 = 0 (h + 7)(h.
Trapezoid Base 1: Base 2: Height: Rectangle Length: Height:
Benchmark 40 I can find the missing side of a right triangle using the Pythagorean Theorem.
Section 11.6 Pythagorean Theorem. Pythagorean Theorem: In any right triangle, the square of the length of the hypotenuse equals the sum of the squares.
DIVISIBILITY RULES.
11/11/2015 Geometry Section 9.6 Solving Right Triangles.
10.2 Areas of Trapezoids, Rhombuses, and Kites
Basic Measurement.
10-3 Angle Relationships G2:Properties of 2- dimensional figures.
Area of Trapezoids Tutorial 13c.
The Pythagorean Theorem
Triangles Sum.
Triangle Inequalities. Definitions Theorem 5-12 Triangle inequality Theorem- Sum of the lengths of any two sides of a triangle is greater than the length.
Lesson 5.4 The Triangle Inequality. Triangle Inequality Theorem The sum of the lengths of any two sides of a triangle is greater than the length of the.
4.7 Triangle Inequalities. In any triangle…  The LARGEST SIDE lies opposite the LARGEST ANGLE.  The SMALLEST SIDE lies opposite the SMALLEST ANGLE.
The length of a rectangle is 6 in. more than its width. The perimeter of the rectangle is 24 in. What is the length of the rectangle? What we know: Length.
A little game to end the week…. I think of 2 numbers… Sum = 5 Product =
Polygons and Triangles Chapter 10 Lesson 4 and 5
Writing Equations.
Section 8-3 The Converse of the Pythagorean Theorem.
4.7 Triangle Inequalities
5.4 The Triangle Inequality What you’ll learn: 1.To apply the triangle inequality Theorem 2.To determine the shortest distance between a point and a line.
Math Facts Fluency Part 1: sums to 7 Part 2: sums to 10 Part 3: sums to 20.
Classifying Triangles. Two Ways to Classify Triangles  By Their Sides  By Their Angles.
Math Pacing Special Products 3 5 3x – 5 6x + 3. Special Products 8-7 Multiplying Polynomials.
Example: cost of bananas at $0.19 each 0.19b Objective.
Polygon Equations Summary. Equation The sum of the exterior angles of a polygon is always 360 o. The sum of the exterior angles of a polygon is always.
8.3 Ellipses May 15, Ellipse Definition: Is the set of all points such that the sum of the distances between the point and the foci is the same.
Addition Flashcards Sum of
Geometry Section 11.2 Areas of Trapezoids, Rhombuses, and Kites.
The Definite Integral. Area below function in the interval. Divide [0,2] into 4 equal subintervals Left Rectangles.
Over Lesson 8–3. Splash Screen Special Products Lesson 8-4.
Chapter 5 Integrals 5.2 The Definite Integral
Radical expressions 3 September 6, 2016.
Surface Area of Rectangular Prisms
Pythagoras’ Theorem – Outcomes
The Converse of the Pythagorean Theorem
Adding Numbers in Scientific Notation
Solve more difficult number problems mentally
[non right-angled triangles]
Copyright 2011 Davitily.
The Law of Cosines.
Sum and Difference Identities for the Sin Function
Triangle Inequalities
Essential Questions: How can sums and differences of fractions and mixed numbers be estimated? What are the standard procedures for adding and subtracting.
2 Linear Time-Invariant Systems --Analysis of Signals and Systems in time-domain An arbitrary signal can be represented as the supposition of scaled.
Divisibility Rules.
Divisibility Rules.
Divisibility Rules.
Calculus II (MAT 146) Dr. Day Friday, February 23, 2018
Objective - To add and subtract decimals.
TRIANGLE INEQUALITY THEOREM
5-6 Inequalities in ONE Triangle
Rita Korsunsky.
What are the ratios between side lengths?
Pythagoras’ Theorem.
Intro to Polynomials.
Classifying Triangles
Calculus II (MAT 146) Dr. Day Monday, February 26, 2018
Module 15: Lesson 1 Interior & Exterior Angles
Triangles.
Convolution sum & Integral
Presentation transcript:

function [x,niter]=gausseidel(A,b,e,N,x0) n=length(b); x=x0; xk=x0; for niter=1:N for i=1:n; Sum1=A(i,1:i-1)*x(1:i-1); Sum2=A(i,i+1:n)*xk(i+1:n); x(i)=(1/A(i,i))*(b(i)-Sum1-Sum2); end if ((x-xk)'*(x-xk)/(x'*x))<e return; else xk=x; end error("LA METHODE DE GAUSS-SEIDEL NE CONVERGE PAS!!!"); endfunction

function [x,i]=newton(foncjac,e,N,x0) x=x0; for i=1:N [F,J]=foncjac(x); h=-J\F // on resout Jh=-F x=x+h; if ((h'*h)/(x'*x+%eps)<e) return; end error("LA METHODE DE NEWTON NE CONVERGE PAS!!!"); endfunction function courbe(N) teta=linspace(0,2*%pi,N); x=linspace(-4,2,N); plot(2*cos(teta),2*sin(teta),x,exp(x),'axis','equal'); endfunction function [F,J]=foncjac(x) F(1)=x(1)^2+x(2)^2-4; F(2)=x(2)-exp(x(1)); J=[ 2*x(1) 2*x(2); -exp(x(1)) 1 ]; endfunction

function [F,J]=foncjac2(v) alpha=5; betta=5; deff('x=g(v)','x=10*v/(1+v)'); deff('x=g1(v)','x=10/((1+v)^2)'); n=length(v); x=linspace(0,1,n); F=zeros(n-1,1); d=zeros(n-1,1); h=1/n; F(1)=-alpha+2*v(1)+h*h*g(v(1))-v(2)-h^2*(-x(1)*(x(1)-1)); for i=2:n-2 F(i-1)=-v(i-1)+2*v(i)+h^2*g(v(i))-v(i+1)-h^2*(-x(i)*(x(i)-1)); end F(n-1)=-v(n-3)+2*v(n-2)+h^2*g(v(n-2))-betta-h^2*(-x(n-2)*(x(n-2)-1)); d=2+h^2.*g1(v(1:n-1)); J=diag(-1*ones(n-2,1),-1)+diag(-1*ones(n-2,1),1)+diag(d); endfunction

function [x,i]=newton(foncjac,e,N,x0) x=x0; for i=1:N [F,J]=foncjac(x); h=[0;-J\F;0] // on resout Jh=-F x=x+h; if ((h'*h)/(x'*x)<e) return; end error("LA METHODE DE NEWTON NE CONVERGE PAS!!!"); endfunction