Single Variable Optimization

Optimization … finding local maximum/minimum points.

local extreme … the extreme on a smaller domain global extreme … the extreme on the whole domain

for all maxima holds since if the slope is non-zero there will be larger and lower values to both sides. Count of solutions to is the count of extreme points can be 1, can be 0, can be many.

Second-Order Derivative Test

… positive … 😄 … mouth sloped upwards … local minimum … negative … 😦 … mouth sloped downwards … local maximum … inconclusive, we don’t know if minimum or maximum

First-Order Derivative Test

… extreme point … Domain of extreme point &&

derivative is positive in one direction and negative in the other direction for some domain.

Global Maximum/Minimum

one needs to check all extreme points and also the end-points of the domain

Example Profit

Revenue … Costs …

Profit … … only is relevant, since must be positive … maximum profit at 20 units sold

Second-Order Derivative Test

… local maximum … local minimum (irrelevant)

First-Order Derivative Test

Factorization from above:

Analyzing the factorization:

  • … negative
  • … positive
  • … negative

Global Minimum/Maximum

on the domain

global minimum … global maximum …

Multivariate Optimization

We will only focus on 2 variables i.e. . More variables gets even more complicated.

a point is only an extreme point if both derivatives are zero and

then take direct derivatives and check if they are non-zero

local extreme … product of direct derivatives > product of cross derivatives

saddle point … product of direct derivatives = product of cross derivatives saddle point is like a horse saddle, across x minimum, across y maximum #wontfix write down in math notation

Example Profit

solve for … one candidate point at

Direct Derivatives: … maximum Check with cross derivatives:

… true

Example Profit 2

#wontfix finish math notation

Constraint Optimization

and should not just be part of a maximum but also fulfill other constraints. e.g.

therefore … we can rearrange to and plug into the function to maximize But careful, that is only possible because the constrained in this case is very simple. If the function is complex, use the Lagrange Multiplier Method

Lagrange Multiplier Method

lagrangian number will “punish” deviating from the required constraint such that

#wontfix finish math notation

wontfix write some R code

Epsilon

In Math in general the Epsilon is something that is positive and very small. This can be used to overcome rounding errors in Numerical Approximation problems.