Você está na página 1de 12

Kuliah 03-04

Roots

f ( x) x 3 6 x 2 27 0
p=
1

-6 -27

x=
9
-3

f ( x) x 4 10 x 3 35 x 2 50 x 24 0

p=
1 -10

35 -50

24

x=
4.0000
3.0000
2.0000
1.0000

f ( x) x 4 35 x 2 50 x 24 0
p=
1

35 -50

24

x=
-0.7014 + 5.9845i
-0.7014 - 5.9845i
0.7014 + 0.4113i
0.7014 - 0.4113i

f ( x) x 4 10 x 3 50 x 24 0
p=
1 -10

0 -50

24

x=
10.4378 + 0.0000i
-0.4496 + 2.1869i
-0.4496 - 2.1869i
0.4613 + 0.0000i

p=
1

-9

26

24

x=
4.8630 + 3.0679i
4.8630 - 3.0679i
-0.7259 + 0.0000i

f ( x) x 3 9 x 2 26 x 24 0

p=
1

-20

155

-580

1440

x=
8.0314 + 3.1642i
8.0314 - 3.1642i
1.6494 + 3.5236i
1.6494 - 3.5236i
0.6384 + 0.0000i
Fzero

f ( ) 53 cos( 40) 52 cos( ) 116 cos( 40 ) 0

f=

-720

@(x)(5/3*cos(40))-(5/2*cos(x))+11/6-cos(40-x)

x0 =
1
x=
1.5835

f ( x) x cos( x) 0
f = @(x)x-cos(x)
x0 = 3
x = 0.7391

f ( x) e x 2 x 2 0

f = @(x)exp(x)-2*x-2
x0 = 2
x = 1.6783
Fsolve

2 x12 3 x22 50 0
2 x12 x2 9 0

F = @(x)[2*(x(1)^2)+3*(x(2)^2)-50;2*(x(1)^2)-x(2)-9]
x0 = 1

options =
Display: 'iter'
MaxFunEvals: []
MaxIter: []

TolFun: []
TolX: []
FunValCheck: []
OutputFcn: []
PlotFcns: []
ActiveConstrTol: []
Algorithm: []
AlwaysHonorConstraints: []
BranchStrategy: []
DerivativeCheck: []
Diagnostics: []
DiffMaxChange: []
DiffMinChange: []
FinDiffRelStep: []
FinDiffType: []
GoalsExactAchieve: []
GradConstr: []
GradObj: []
HessFcn: []
Hessian: []
HessMult: []
HessPattern: []
HessUpdate: []
InitialHessType: []
InitialHessMatrix: []
InitBarrierParam: []
InitTrustRegionRadius: []
Jacobian: []
JacobMult: []
JacobPattern: []
LargeScale: []
MaxNodes: []
MaxPCGIter: []
MaxProjCGIter: []

MaxRLPIter: []
MaxSQPIter: []
MaxTime: []
MeritFunction: []
MinAbsMax: []
NodeDisplayInterval: []
NodeSearchStrategy: []
NoStopIfFlatInfeas: []
ObjectiveLimit: []
PhaseOneTotalScaling: []
Preconditioner: []
PrecondBandWidth: []
RelLineSrchBnd: []
RelLineSrchBndDuration: []
ScaleProblem: []
Simplex: []
SubproblemAlgorithm: []
TolCon: []
TolConSQP: []
TolGradCon: []
TolPCG: []
TolProjCG: []
TolProjCGAbs: []
TolRLPFun: []
TolXInteger: []
TypicalX: []
UseParallel: []

Norm of
Iteration Func-count

f(x)

First-order Trust-region
step

2089

1270.04

196.872

2.5

optimality
262
370
281

radius
1
1
2.5

12

0.892584

0.58948

15

7.64876e-05

0.0558044

18

1.07165e-12

0.000604972

21

4.32296e-28

7.3075e-08

15.7
0.128

2.5
2.5

1.48e-05
2.67e-13

2.5
2.5

Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.
<stopping criteria details>

x = 2.5034

3.5339

fval = 1.0e-13 *
0.0711
0.1954

5( x2 x12 ) 4 0
(1 x1 ) 2 0

F = @(x)[5*(x(2)+x(1)^2)^(4);(1-x(1))^2]
x0 = 2

options =
Display: 'iter'
MaxFunEvals: []
MaxIter: []
TolFun: []

TolX: []
FunValCheck: []
OutputFcn: []
PlotFcns: []
ActiveConstrTol: []
Algorithm: []
AlwaysHonorConstraints: []
BranchStrategy: []
DerivativeCheck: []
Diagnostics: []
DiffMaxChange: []
DiffMinChange: []
FinDiffRelStep: []
FinDiffType: []
GoalsExactAchieve: []
GradConstr: []
GradObj: []
HessFcn: []
Hessian: []
HessMult: []
HessPattern: []
HessUpdate: []
InitialHessType: []
InitialHessMatrix: []
InitBarrierParam: []
InitTrustRegionRadius: []
Jacobian: []
JacobMult: []
JacobPattern: []
LargeScale: []
MaxNodes: []
MaxPCGIter: []
MaxProjCGIter: []
MaxRLPIter: []

MaxSQPIter: []
MaxTime: []
MeritFunction: []
MinAbsMax: []
NodeDisplayInterval: []
NodeSearchStrategy: []
NoStopIfFlatInfeas: []
ObjectiveLimit: []
PhaseOneTotalScaling: []
Preconditioner: []
PrecondBandWidth: []
RelLineSrchBnd: []
RelLineSrchBndDuration: []
ScaleProblem: []
Simplex: []
SubproblemAlgorithm: []
TolCon: []
TolConSQP: []
TolGradCon: []
TolPCG: []
TolProjCG: []
TolProjCGAbs: []
TolRLPFun: []
TolXInteger: []
TypicalX: []
UseParallel: []

Norm of
Iteration Func-count

f(x)

4.19904e+07

6.47872e+06

745425

12

78127.6

First-order Trust-region
step

optimality

radius

1.12e+08
0.707107
0.503891
0.606765

1.64e+07
2.06e+06
2.57e+05

1
1
1

15

7941.57

0.546554

3.29e+04

18

799.093

0.448356

4.28e+03

21

80.1348

0.353617

563

24

8.02704

0.273427

74.6

27

0.803761

30

0.0804719

0.209067
0.158772

9.92
1.32

1
1

10

33

0.00805644

0.120059

11

36

0.00080656

0.0905331

0.0235

12

39

8.07472e-05

0.068144

0.00314

13

42

8.08384e-06

0.05123

0.000419

14

45

8.09297e-07

0.0384835

15

48

8.1021e-08

16

51

8.11125e-09

0.0288931
0.0216851

0.176

5.59e-05
7.46e-06
9.96e-07

1
1
1

Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.
<stopping criteria details>

x = 1.0000 -0.9349
fval =
1.0e-04 *
0.9006
0.0000

x13 e x2 sinh( x3 ) 3.62882


x12 x3 ( x22 x3 ) 4
x1 x2 x3 x3 x1 x2

4 .0
5 .0

F = @(x)[x(1)^3+sinh(x(3))-3.62882;(x(1)^2)*x(3)+((x(2)^2)-x(3))^4-4;
(x(1)*x(2)*x(3))-x(3)+(x(1)*x(2))-5]
x0 =
3

options =
Display: 'iter'
MaxFunEvals: []
MaxIter: []
TolFun: []
TolX: []
FunValCheck: []
OutputFcn: []
PlotFcns: []
ActiveConstrTol: []
Algorithm: []
AlwaysHonorConstraints: []
BranchStrategy: []
DerivativeCheck: []
Diagnostics: []
DiffMaxChange: []
DiffMinChange: []
FinDiffRelStep: []
FinDiffType: []
GoalsExactAchieve: []
GradConstr: []
GradObj: []
HessFcn: []
Hessian: []
HessMult: []

HessPattern: []
HessUpdate: []
InitialHessType: []
InitialHessMatrix: []
InitBarrierParam: []
InitTrustRegionRadius: []
Jacobian: []
JacobMult: []
JacobPattern: []
LargeScale: []
MaxNodes: []
MaxPCGIter: []
MaxProjCGIter: []
MaxRLPIter: []
MaxSQPIter: []
MaxTime: []
MeritFunction: []
MinAbsMax: []
NodeDisplayInterval: []
NodeSearchStrategy: []
NoStopIfFlatInfeas: []
ObjectiveLimit: []
PhaseOneTotalScaling: []
Preconditioner: []
PrecondBandWidth: []
RelLineSrchBnd: []
RelLineSrchBndDuration: []
ScaleProblem: []
Simplex: []
SubproblemAlgorithm: []
TolCon: []
TolConSQP: []
TolGradCon: []
TolPCG: []

TolProjCG: []
TolProjCGAbs: []
TolRLPFun: []
TolXInteger: []
TypicalX: []
UseParallel: []

Você também pode gostar