10.07.2015 Views

Numerical Methods Library for OCTAVE

Numerical Methods Library for OCTAVE

Numerical Methods Library for OCTAVE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.7.3 Lagrange multipliers[XMIN, LAMBDAMIN, FMIN] = OPT_LAGRANGE(F, GRADF, G, JACG, X0) computed theminimum of the function FUN subject to ’G(X) = 0’ with the lagrange multipliermethod. Function GRADF defines the gradient vector of F. Function G representsequality-constrained and function JACG defines its jacobian matrix. F andG accept a real vector input and return a real vector. F, GRADF, G and JACGcan also be inline object.ParametersF evaluated function.GRADF F’s gradient function.G equality-constrained function : ’G(X) = 0’.X0 initial point.ReturnsXMIN computed solution of min(FUN).LAMBDAMIN vector of Lagrange multipliers on XMIN.FX value of FUN(X) with X computed solution.Consider the minimization of a nonlinear function subject to nonlinear equality constraints,where f : R n → R and g : R n → R m , with m ≤ n.The Lagrangian function, L : R n+m → R, is given byminxf (x) subject to g(x) = 0, (14)L(x, λ) = f (x) + λ T g(x), (15)whose gradient and Hessian are given by[ ] [ ]Lx (x, λ) ▽ f (x) + JT▽L(x, λ) = =g (x)L λ (x, λ) g(x)where J g is the Jacobian matrix of g and λ is an m-vector of Lagrange multipliers.Together, the necessary condition and the requirement of feasibility say that we are looking<strong>for</strong> a critical point of the Lagrangian function, which is expressed by the system of nonlinearequations[ ]▽ f (x) + JTg (x)= 0 (17)g(x)3.8 Initial value problems <strong>for</strong> Ordinary differential EquationsWe determine a unique solution to the ODE y ′ (t) = f (y, t) with y(t 0 ) = t 0 , provided that f iscontinuously differentiable. Because the independent variable t usually represents time, wethink of t 0 as the initial time and y 0 as the initial value. Hence, this is termed an initial valueproblem. The ODE governs the dynamic evolution of the system in time from its initial state y 0at time t 0 onward, and we seek a function y(t) that describes the state of the system as a functionof time.20(16)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!