% This is an example file accompanying "LaTeX for Administrative Work"
% and was adapted from the file prob-easy2.tex in the probsoln.sty bundle.
%
% These are all easy differentiation problems

\begin{defproblem}{diff:gpowh}%
\begin{onlyproblem}%
\(f(x) = g(x)^{h(x)}.\)%
\end{onlyproblem}%
\begin{onlysolution}%
\begin{align*}
f(x) & =  e^{\ln g(x)^{h(x)}}\\
 & = e^{h(x)\ln g(x)}\\
f'(x) & = e^{h(x)\ln g(x)}(h'(x)\ln g(x) + h(x)\frac{g'(x)}{g(x)})\\
 & = g(x)^{h(x)}(h'(x)\ln g(x) + \frac{h(x)g'(x)}{g(x)})
\end{align*}%
\end{onlysolution}%
\end{defproblem}

\begin{defproblem}{diff:arcsin}%
\begin{onlyproblem}%
\(y = \arcsin(x)\)%
\end{onlyproblem}%
\begin{onlysolution}%
\[\sin(y) = x\]
diff. w.r.t. $x$:
\begin{align*}
\cos y \frac{dy}{dx} & = 1\\
\frac{dy}{dx} & = \frac{1}{\cos y}\\
 & = \frac{1}{\sqrt{1 - \sin^2y}}\\
 & = \frac{1}{\sqrt{1-x^2}}.
\end{align*}
\end{onlysolution}%
\end{defproblem}

\begin{defproblem}{diff:arccos}%
\begin{onlyproblem}%
$y = \arccos x$.%
\end{onlyproblem}%
\begin{onlysolution}%
\(\cos y = x\)
diff. w.r.t. $x$:
\begin{align*}
-\sin y \frac{dy}{dx} & = 1\\
\frac{dy}{dx} & = \frac{-1}{\sin y}\\
 & = \frac{-1}{\sqrt{1-\cos^2y}}\\
 & = \frac{-1}{\sqrt{1-x^2}}
\end{align*}
\end{onlysolution}%
\end{defproblem}

\begin{defproblem}{diff:tan}%
\begin{onlyproblem}%
\(y = \tan x\)%
\end{onlyproblem}
\begin{onlysolution}%
\begin{align*}
y & = \tan x\\
 & = \frac{\sin x}{\cos x}\\
\frac{dy}{dx} & = \frac{\cos x}{\cos x} + \sin x\times\frac{-1}{\cos^2x}\times -\sin x\\
 & = 1 + \tan^2x\\
 & = \sec^2x.
\end{align*}
\end{onlysolution}%
\end{defproblem}

\begin{defproblem}{diff:arctan}%
\begin{onlyproblem}%
\(y = \arctan x = \tan^{-1}x\)%
\end{onlyproblem}%
\begin{onlysolution}%
\[\tan y = x\]
diff w.r.t. $x$:
\begin{align*}
\sec^2y\frac{dy}{dx} & = 1\\
\frac{dy}{dx} & = \frac{1}{\sec^2y}\\
 & = \frac{1}{1+\tan^2y}\\
 & = \frac{1}{1+x^2}
\end{align*}
\end{onlysolution}%
\end{defproblem}

\begin{defproblem}{diff:cot}%
\begin{onlyproblem}%
\(y = (\tan x)^{-1} = \cot x\)%
\end{onlyproblem}
\begin{onlysolution}%
\begin{align*}
\frac{dy}{dx} & = -(\tan x)^{-2}\sec^2x\\
 & = -\frac{\cos^2x}{\sin^2x}\cdot\frac{1}{\cos^2x}\\
 & = \frac{-1}{\sin^2x}\\
 & = -\csc^2x.
\end{align*}
\end{onlysolution}%
\end{defproblem}

\begin{defproblem}{diff:cosxsqsinx}%
\begin{onlyproblem}%
$y = \cos(x^2)\sin x$.%
\end{onlyproblem}%
\begin{onlysolution}%
\[\frac{dy}{dx} = -\sin(x^2)2x\sin x + \cos(x^2)\cos x\]
\end{onlysolution}%
\end{defproblem}

\begin{defproblem}{diff:xlnx}%
\begin{onlyproblem}%
$y = (x+1)\ln(x+1)$.
\end{onlyproblem}%
\begin{onlysolution}%
\begin{align*}
\frac{dy}{dx} & = \ln(x+1) + \frac{x+1}{x+1}\\
 & = 1 + \ln(x+1).
\end{align*}
\end{onlysolution}
\end{defproblem}

\begin{defproblem}{diff:glng}%
\begin{onlyproblem}%
$f(x) = g(x)\ln(g(x))$.
\end{onlyproblem}
\begin{onlysolution}%
\begin{align*}
f'(x) & = g'(x)\ln(g(x)) + \frac{g(x)}{g(x)}g'(x)\\
 & = g'(x)(1+\ln(g(x))).
\end{align*}
\end{onlysolution}%
\end{defproblem}

\begin{defproblem}{diff:sinx/x}
\begin{onlyproblem}%
$y = \frac{\sin x}{x}$.
\end{onlyproblem}
\begin{onlysolution}%
\[\frac{dy}{dx} = \frac{\cos x}{x} - \frac{\sin x}{x^2}\]
\end{onlysolution}%
\end{defproblem}

