0 Up votes0 Down votes

3 views31 pagesmatlab course

Oct 02, 2015

© © All Rights Reserved

PDF, TXT or read online from Scribd

matlab course

© All Rights Reserved

3 views

matlab course

© All Rights Reserved

- Neuromancer
- The E-Myth Revisited: Why Most Small Businesses Don't Work and
- How Not to Be Wrong: The Power of Mathematical Thinking
- Drive: The Surprising Truth About What Motivates Us
- Chaos: Making a New Science
- The Joy of x: A Guided Tour of Math, from One to Infinity
- How to Read a Person Like a Book
- Moonwalking with Einstein: The Art and Science of Remembering Everything
- The Wright Brothers
- The Other Einstein: A Novel
- The 6th Extinction
- The Housekeeper and the Professor: A Novel
- The Power of Discipline: 7 Ways it Can Change Your Life
- The 10X Rule: The Only Difference Between Success and Failure
- A Short History of Nearly Everything
- The Kiss Quotient: A Novel
- The End of Average: How We Succeed in a World That Values Sameness
- Made to Stick: Why Some Ideas Survive and Others Die
- Algorithms to Live By: The Computer Science of Human Decisions
- The Universe in a Nutshell

You are on page 1of 31

in MATLAB

Lecture 7

Riddhi Singh

Email: riddhi@iith.ac.in

1

Todays outline

Non-linear equations

System of non-linear equations

NON-LINEAR EQUATIONS

linear system: additivity and homogeneity

additivity : f ( x y ) f ( x) f ( y )

homogeneity : _______________________

superposition : _______________________

nonlinear otherwise

4

f(x)

g(x)

x

Linear system

x

Nonlinear system

f ( x) x 2 x 1

f ( x) sin( x)

f ( x) x1/3 1

f ( x) log( x ) 2

2

....

one (system of equations) unknowns

1. ______ unknown solution is a ___________________

f ( x) x x 1

2

f ( x) sin( x)

2. ______________ unknown: _______________________

f1 ( x) x x2 1

2

1

f 2 ( x) sin( x1 ) cos(x 2 )

In case of more than one unknown, the solutions is a _______

7

1. One unknown solution is a scalar

f ( x)

2. More than one unknown: system of non-linear equations

fi ( x )

Also termed, ___________

8

1.

2.

3.

4.

5.

_____________

_____________

_____________

_____________

_____________

identification

method

method

method

method

Increasing complexity

than the previous one

Method

Information used

Interval identification

Signs of f(x)

Bisection

Signs of f(x)

False position

Newton-Raphson

derivatives

Secant

derivatives using f(x)

10

NON-LINEAR EQUATIONS

WITH ONE UNKNOWN

11

equation. The key command is solve

%define an unknown

>> syms x;

%solve a nonlinear equations in x

>>solve(x^3-3*x+1)

>>eval(solve(x^3-3*x+1))

%define a system of equations:

>> syms x1 x2 x3

>> S = solve('x1+x2+x3=3','x1^2+x2^2+x3^2=5','exp(x1)+x1*x2-x1*x3=1')

>> Sx1 = S.x1;

>> Sx2 = S.x2;

>> Sx3 = S.x3;

12

Intermediate value theorem

If a function f is continuous on the closed interval [a,b], and if f(a)yf(b)

or f(b)yf(a), then there exists a point c such that acb and f(c)=y

f(x)

then at some point r,

f(r) =_____. Therefore, f(a)and f(b) are

of ____________ signs, or

f (a ) 0 f (b)

13

1. Start with a guess (eg. xo=0) and interval width x

2. Let x1=xo and x2=xo + x

3. While f(x1)*f(x2)>0

new x1 = x2

new x2 = x1 + x

4. Root lies in the interval [x1,x2]

*Limitations:

1. Cannot detect double roots

2. Cannot detect closely spaced roots if the chosen interval

is too large

14

the interval identification method

Repeat the interval identification method for successively small intervals

If a root of f(x) lies in the interval

[a,b], then construct a new interval,

c=(a+b)/2. Reevaluate:

f(x)

f (a ) * f (c), and

c

a

f (b) * f (c)

15

1. If the root lies in the interval [x1,x2]

2. While error>tolerable error

c=(x1+x2)/2

error = (x2-x1)/2

If f(x1)*f(c)>0

x1=c

Else

x2=c

*Limitations:

1. Slow convergence than other methods that use more

information

16

interval identification method

Instead of using the mid-point, this method uses the point where the secant

between f(a) and f(b) intersects the x-axis

The triangles formed by the secant

are similar, therefore:

f(x)

bc

ca

f (b) f (a )

b, f(b)

a c

a, f(a)

17

bisection)

1. If the root lies in the interval [x1,x2]

2. While error>tolerable error

c= af (b) bf (a )

f (b) f (a )

If f(x1)*f(c)>0

x1=c

Else

x2=c

*Limitations:

1. May select the same endpoint- in that case will converge

slowly

18

curve with a tangent

This method assumes that the function f is differentiable.

using:

tangent

l ( x) f ( xo )( x xo ) f ( xo )

x1 xo

y=f(x)

0

x1

xo

19

1. Assume an initial estimate of the root, xo

2. fx=f(xo), fp=f(xo)

3. While precision>prescribed_precision

x=x- fx/fp

fx= f(x)

fp=f(x)

precision= abs(fx/fp);

*Limitations:

1. Sensitive to the nature of the function may get trapped

if the tangent to the curve is parallel to the x-axis

2. Detects a multiple root (root of the function is also a

root of its derivative) only with linear convergence

20

derivative instead of estimating them analytically

This method is the same as Newton-Raphson except that the derivatives

are approximated

secant

as:

f ( x h) f ( x )

f ( xo ) lim

h 0

h

f ( xn 1 ) f ( xn )

f ( xn )

xn 1 xn

y=f(x)

0

xn+1

xn

xn-1

xn 1 xn ____________ f ( xn )

21

1. Assume two intial intervals in which the root will lie, x1 and x2

2. fx1=f(x1), fx2=f(x2)

3. While precision>prescribed_precision

x1 = x2

fx1 = fx2

fp = (fx2-fx1)/(x2-x1)

x2 = x2-fx2/fp

precision = fx2/fp

*Limitations:

1. Slower than Newton-Raphson (although faster than bisection)

2. Can diverge instead of converging

22

SYSTEM OF NONLINEAR

EQUATIONS

23

f1 ( x1 , x2 ,..., xn ) 0

f 2 ( x1 , x2 ,..., xn ) 0

.

.

.

f n ( x1 , x2 ,..., xn ) 0

Matrix notation:

F ( X) 0

24

In case of an unknown vector, the derivative of the function can be

estimated w.r.t each component of the vector

Suppose, vector X is defined as:

X [ x1 , x2 ,..., xn ]

Then, the derivative of a function, f, w.r.t the vector

X is given by the ________ vector:

F1 F1

F1

J

,...,

x

n

1 2

25

System

f1 ( x1 , x2 ,..., xn ) 0

f 2 ( x1 , x2 ,..., xn ) 0

.

.

.

f n ( x1 , x2 ,..., xn ) 0

Jacobian matrix

f1

f1

x . . . x

n

1

f 2

f 2

x . . . x

n

1

.

J .

.

.

.

.

f n . . . f n

x1

xn

26

systems by using the matrix notation*:

X k 1 X k [F '( X k )]1 F ( X k )

X

k 1

k 1

X [ J ] F( X )

k

( X k 1 X k ) [ J k ]1 F( X k )

J (X

k

k 1

X ) F ( X )

k

J k H k F ( X k )

Solving the Jacobian linear systems yields the value of the

vector for the next time step

*Derivation is based on _____________ expansion.

27

Newton-Raphson

x y z 3

x y z 5

2

e xy xz 1

x

28

J ?

?

?

?

?

?

?

29

1. Assume an initial estimate of the root vector

x=[xo, x1,, xn]

2. While precision>required_precision

Estimate, F=f(x)

Estimate, J=Jacobian(x)

Solve: JH=-F

X = X+H

precision= norm(H);

system of non-linear equations

30

Method

Convergence formula

Convergence type

Interval identification

---

---

Bisection

False position

log(b a ) log(2 )

log 2

Linear

(an r ) f (r )

2 f (r ) f (r )(en 1 an r )

Linear

en 1

Newton-Raphson

1 f ( n ) 2

en

en 1

2 f ( xn )

Quadratic

Secant

1 f (r )

en 1

en en 1

2 f (r )

Super linear

Increasing complexity

the required precision and initial guesses

31

- Implementation Of Geometrical Nonlinearity in FEASTSMTUploaded byIOSRjournal
- Newton’s Method and High Order IterationsUploaded byUsama Taha
- Useful mathematical tools.pdfUploaded byBuddhika
- Newton Raph1Uploaded byMaria Tns
- Rr10106-Introductions to ComputersUploaded bySRINIVASA RAO GANTA
- 1004.2930v1Uploaded byAman Machra
- Non-linear Regression ExamplesUploaded byangel_hun
- Nm6s r08 Mayjune 12Uploaded byVenkatThiruvengadam
- 04524745Uploaded byEligius Martinez
- The Functional Variable Method to Some Complex Nonlinear Evolution EquationsUploaded bySEP-Publisher
- MethodsUploaded bydiegoferro90
- m5 upto nov 2012Uploaded byChennai Tuitions
- noor2015Uploaded byzi
- Lec 21 Marquardt MethodUploaded byMuhammad Bilal Junaid
- Lecture 2 First ExamplesUploaded bymarbonf
- MDOF Manual OpenseesUploaded byRannie Ison
- Femap_Tips110528Uploaded byerwannlejeune
- 10. advanced topics in robotics.pdfUploaded byAryama Mandal
- Week3Lecture1.pdfUploaded byRavi Kumar
- NASCON_manual.pdfUploaded byNIE
- Lecture 4 - Getting Started With ABAQUSUploaded byCharaf Khelifi
- Continuous Sliding Mode Controller With Disturbance Observer for 2015Uploaded byyasir9909
- Assgn1Uploaded byJoe Dare
- Solution of the Linear and Non-linear Partial Differential Equations Using Homotopy Perturbation MethodUploaded byAJER JOURNAL
- Bacal LecturesUploaded byDino Spencer Pabilico
- Lista 2 - MAT 241 - 2018-IUploaded byWeber Mardegan Sardenberg
- 2dsteadyUploaded bykingbob_1983
- Vensim Tutorial 1Uploaded byalmamalik
- DERIVATIVE.docxUploaded byYusni Zakia
- CalculusUploaded byCris Sosa

- Design of Water Treatment PlantUploaded byNikhil
- New Doc 2019-11-19 18.25.23Uploaded byPremKumar
- kegy213Uploaded byPremKumar
- This Unit Deals WithUploaded bygrsrik
- Copy of DSR Analysis (1)Uploaded byPremKumar
- Irc 101 for Reinforced Concrete Design RoadUploaded byPremKumar
- Central Min WageUploaded byPremKumar
- Assignment 5 solutions.pdfUploaded byMuhammad Idris
- Reduce FatUploaded byPremKumar
- new doc 2017-05-10 10.46.21_20170510104728Uploaded byPremKumar
- Testing 1Uploaded byPremKumar
- CE 3010 Syllabus - Summer 2017Uploaded byPremKumar
- Primary School Footing DesignUploaded byPremKumar
- Paypal Money for Last 6 MonthUploaded byPremKumar
- Sk Garg Book for Irrigation EngineeringUploaded byPremKumar
- Principles of Irrigation EngineeringUploaded byNiiteSajo
- 1282307000-1.pdfUploaded byPremKumar
- Irrigation Eng in Erring PrinciplesUploaded bypoojasharath
- lecture33.pdfUploaded byPremKumar
- tank design.pdfUploaded byPremKumar
- ritesh kumar .txtUploaded byPremKumar
- lecture31.pdfUploaded byPremKumar
- CEE 313 HW_6 and 7 Fall 2012Uploaded byPremKumar
- Annexure 15_Tool for Water Treatment Plant Design.xlsxUploaded byPremKumar
- Mine Water ListUploaded byPremKumar
- 02 Turbo Machinery TB 493Uploaded byPremKumar
- Student MatUploaded byPremKumar
- trakers(1)Uploaded byPremKumar
- prob2-31s.pdfUploaded byPremKumar
- Book1Uploaded byPremKumar

- Solaris Vi Editor CommandsUploaded bytechfolkcmr
- Computer assisted qualitative data analysis software: a practical perspective for applied researchUploaded bynocibambi
- Compresores coperlandUploaded byjesus medina
- Wireless Sensor NetworkUploaded bysafaahah
- Normal Item No ProjectsUploaded bySumit Gupta
- HP VDI Reference ArchitectureUploaded byAlee Di Vaio
- CCW-R Executive Deck ExternalUploaded bysaqr8000
- Think Twice Code Once _bt9Uploaded byNelson Picones
- Microsoft Access and SQLUploaded byShilpa Alagh
- [Doi 10.1109_ICACTE.2008.9] Xiao-kan, Wang; Zhong-liang, Sun; Wanglei, ; Dong-qing, Feng -- [IEEE 2008 International Conference on Advanced Computer Theory and Engineering (ICACTE) - Phuket, ThailanUploaded byیاسر حفیظ
- Dinamometro DillonUploaded byMario Freitez
- vlsiUploaded byRajaganapathi Rajappan
- PANTONE Color Manager Help_enUploaded byard136011
- Ericsson_3G_Directed_Retry_to_GSM.pdfUploaded bylikamele
- Case 3:19-cv-03132Uploaded byDan Robitzski
- Client Server ComputingUploaded bySwati Sinsinwar Tewatia
- ProcessingUploaded bymostafa
- 04 - CANopenUploaded byLê Minh Pháp
- Video Codec Comparison ReportUploaded bygo4sri2
- AutoCAD Plant 3D - 08 OrtografUploaded byAlberto Carrizo
- Bipartite Graphs StandfordUploaded byaseemgoyal92
- TT 61LA10 TIM Datasheet - THERMOGRAPHIC MODULESUploaded byIntellisystem Technologies
- Intelligent NetworkUploaded byAhmed Barkaati
- pseudo codesUploaded byVinti Pandey
- Using Flash Builder 4Uploaded bychelovip
- Sharjeel Et Al 2016 UPPC - Urdu Paraphrase Plagiarism CorpusUploaded byJorge Lima
- kerebrosUploaded byVivek Shukla
- GSW-2693_UMUploaded byRodrigo Pérez Cónsolo
- vm0808ha_w-2017-07-03Uploaded byLam Tuyen
- 32 Bit Multiplication and Division ALU Design Based on RISC StructureUploaded byVishnu Kumar Nadar

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.