First, select an \(f\) and \(g\) in different terms, like so
\begin{equation*}
e^x \
\underset{\Large f}{ \underset{\uparrow}{\ul{\vphantom{|}\cos x}}}
+
\underset{\Large g}{ \underset{\uparrow}{\ul{\vphantom{|}e^x}}} \
\sin x\text{.}
\end{equation*}
For this to work, \(f'\) should be \(\sin x\text{,}\) next to our chosen \(g\text{.}\) However,
\begin{equation*}
f' = [\cos x]' = -\sin x \ne \sin x \quad
\end{equation*}
So this labeling doesnβt work, and we instead try the labels
\begin{equation*}
\underset{\Large f}{ \underset{\uparrow}{\ul{\vphantom{|}e^x}}} \
\cos x
+
e^x \
\underset{\Large g}{ \underset{\uparrow}{\ul{\vphantom{|}\sin x}}}\text{.}
\end{equation*}
Noting that \(f' = [e^x]' = e^x\) is next to \(g\) and \(g' = [\sin x]' = \cos x\) is next to \(f\) confirms this is a valid product rule. Therefore, we can reverse the product rule as
\begin{equation*}
e^x \cos x + e^x \sin x = [e^x \sin x]'\text{.}
\end{equation*}
To make this easier, letβs separate the terms as
\begin{equation*}
\frac{1}{x} e^{x^2} + \ln x (2 x e^{x^2})\text{.}
\end{equation*}
So, as before, we first set \(f\) and \(g\)
\begin{equation*}
\frac{1}{x} \
\underset{\Large f}{ \underset{\uparrow}{\ul{\vphantom{|}e^{x^2}}}}
+
\underset{\Large g}{ \underset{\uparrow}{\ul{\vphantom{|}\ln x}}} \
2 x e^{x^2}\text{,}
\end{equation*}
then verify the derivatives of \(f\) and \(g\) are in the other terms,
\begin{equation*}
f' = \left[e^{x^2}\right]' = 2 x e^{x^2} \quad \qquad g' = \left[\ln x\right]' = \frac{1}{x} \quad \text{.}
\end{equation*}
Therefore,
\begin{equation*}
\frac{e^{x^2}}{x} + 2 x \ln x e^{x^2} = \left[e^{x^2} \ln x\right]'\text{.}
\end{equation*}