You are on page 1of 6

CHE338_Lecture#08

Non-linear systems

For reading
Reference
Chapra

Chapter
6.6

Page
167-171

Objectives

To introduce Jacobian matrix.

To how to solve a set of non-linear equations.

To introduce matlab function, fsolve.

A single and one-dimensional non-linear equation


f(x)

To find the roots for f(x)=0.


3

Non-linear systems

To find the roots


4

Jacobian matrix

f1 ,i
x
1
f 2 ,i
J x1

f ,
n i

x1

f1 ,i
x2
f 2 ,i
x2

f n ,i
x2

f1 ,i

xn

f 2 ,i

xn


f n ,i

xn

Matlab function: fsolve


From the matlab help,
FSOLVE solves systems of nonlinear equations of
several variables.
>>[X,FVAL] = fsolve(FUN,X0,...)% returns the value of the
equations FUN at X.

f =@(x) [ 2*x(1) - x(2) - exp(-1*x(1))


-x(1) + 2*x(2) - exp(-1*x(2))];
[xroot, fval]=fsolve(f, [-5;-5])
6

You might also like