This is a general worked example on Optimization involving only one variable
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.