Section 3: Optimization

3.1: Extreme Values and Critical Points

Conceptual Examples

Plot[x/(x^2+1),{x,-5,5},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{-1,-1/2},{1,1/2}}]
}
]

Plot[Sin[x],{x,-2Pi,2Pi},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{Pi/2,1},{-3Pi/2,1},{-Pi/2,-1},{3Pi/2,-1}}]
}
]

Plot[x^2-3,{x,-3,3},
PlotStyle->Thick,
Epilog->{PointSize[.03],Point[{0,-3}],
Text[Style["min",Large],{.5,-1.8}]}]

Plot[{(x^2-1)/(x^2+1),1},{x,-8,8},
PlotStyle->{{Thick},{Thick,Dashed}},
PlotRange->{-1,1},
Epilog->{PointSize[.03],Point[{0,-1}]}
]/. Line[x__]:>Sequence[Arrowheads[{-.04,.04}],Arrow[x]]

Plot[3-x^2,{x,-3,3},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{0,3}]
}
]/. Line[x__]:>Sequence[Arrowheads[{-.04,.04}],Arrow[x]]

Plot[x^4-8x^2+16,{x,-3,3},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{-2,0},{2,0},{0,16}}]
}
]/. Line[x__]:>Sequence[Arrowheads[{-.04,.04}],Arrow[x]]

Plot[3,{x,-3,3},PlotStyle->{Thick}]

Failures to Have Extrema and the Extreme Value Theorem

Plot[x,{x,-5,5},
PlotStyle->Thick
]/. Line[x__]:>Sequence[Arrowheads[{-.04,.04}],Arrow[x]]

Plot[x^2,{x,-5,5},
PlotStyle->Thick
]/. Line[x__]:>Sequence[Arrowheads[{-.04,.04}],Arrow[x]]

Show[
Plot[x,{x,-5,5},
PlotStyle->Thick
],
ListPlot[{{-5,-5},{5,5}},
PlotMarkers->{"OpenMarkers",Large}]
]

Show[
Plot[1/(x-1),{x,-5,5},
PlotStyle->Thick,ExclusionsStyle->{Dashed,Black,Thick}
],
ListPlot[{{-5,-1/6},{5,1/4}},
PlotMarkers->{Automatic,Large}]
]

f[x_]:=Piecewise[{{x+3,x<0},{x-3,x>0}}]
Show[
Plot[f[x],{x,-5,5},
PlotStyle->Thick
],
ListPlot[{{-5,-2},{5,2},{0,0}},
PlotMarkers->{Automatic,Large}],
ListPlot[{{0,3},{0,-3}},
PlotMarkers->{"OpenMarkers",Large}]
]

Critical Points and Extrema

Plot[x^3-x,{x,0,2},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{Sqrt[3]/3,-2Sqrt[3]/9},{0,0},{2,6}}]
}
]

Plot[(x^2+3)/(x-1),{x,-2,0},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{0,-3},{-1,-2},{-2,-7/3},{2,7}}]
}
]

Plot[2Cos[x]+Sin[2x],{x,0,Pi/2},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{0,2},{Pi/6,3Sqrt[3]/2},{Pi/2,0}}]
}
]

3.3: Classifying Relative Extrema with the First Derivative Test

Plot[3x^4-4x^3-12x^2+5,{x,-2,3},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{-1,0},{0,5},{2,-27}}]
}
]

Plot[x+Sin[x],{x,-2Pi,4Pi},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{-Pi,-Pi},{Pi,Pi},{3 Pi,3Pi}}]
}
]

f[x_]:=x+2Sin[x]
Plot[f[x],{x,-2Pi,4Pi},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[Table[{p,f[p]},
{p,{-4Pi/3,-2Pi/3,2Pi/3,4Pi/3,8Pi/3,10Pi/3}}
]]
}
]

3.4: Concavity and the Second Derivative

Plot[CubeRoot[x^2]*CubeRoot[6-x],{x,-2,10},
PlotStyle->Thick,
Epilog->{
PointSize[.03],Point[{{0,0},{4,2^(5/3)},{6,0}}]
}
]

Plot[x^5 - 4x^3 + 4x + 7,{x,-2,2},
PlotStyle->Thick,
Epilog->{
{
PointSize[.03],Red,Point[{
{-Sqrt[2/5],7-((64 (Sqrt[(2/5)]))/25)},{Sqrt[2/5],7+((64 (Sqrt[(2/5)]))/25)},{-Sqrt[2],7},{Sqrt[2],7}
}]},

PointSize[.03],Black,Point[{
{0,7},{-Sqrt[6/5],7-((16 (Sqrt[(6/5)]))/25)},{Sqrt[6/5],7+((16 (Sqrt[(6/5)]))/25)}
}]
}
]