Hello, Jacobpm64!
It's easier than you think . . .
The hypotenuse of a right triangle has one end at the origin
and one end on the curve $\displaystyle y = x^2e^{3x}$, with $\displaystyle x \geq 0.$
One of the other two sides is on the xaxis, the other side is parallel to the yaxis.
Find the maximum area of such a triangle. At what xvalue does it occur? Code:

 *
 *
 * 
 * y
 * 
*+
 x
The area of a triangle is: $\displaystyle A \,= \,\frac{1}{2}bh$
The area of this triangle is: .$\displaystyle A \:=\:\frac{1}{2}xy$ . . . where $\displaystyle y \:=\:x^2e^{3x}$
So we have: .$\displaystyle A \:=\:\frac{1}{2}x\cdot x^2e^{3x}\quad\Rightarrow\quad A \:=\:\frac{1}{2}x^3e^{3x}$
Differentiate: .$\displaystyle A' \;= \;\frac{1}{2}x^2\!\cdot\!e^{3x}(3) + \frac{1}{2}\!\cdot\!3x^2\!\cdot\!e^{3x} \;= \;\frac{3}{2}x^2e^{3x}(x + 1)$
Equate to zero: .$\displaystyle \frac{3}{2}x^2e^{3x}(x + 1)\;=\;0$
Set each factor equal to zero and solve.
. . $\displaystyle \frac{3}{2}x^2\,=\,0\quad\Rightarrow\quad x\,=\,0$ . . . This gives minimum area ... ha!
. . $\displaystyle e^{3x} \,=\,0$ . . . but $\displaystyle \frac{1}{e^{3x}}$ can never equal zero.
. . $\displaystyle x + 1 \:=\:0\quad\Rightarrow\quad x\,=\,1$ . . . There!
Maximum area occurs when $\displaystyle \boxed{x \,= \,1}$ and $\displaystyle y \,= \,1^2\!\cdot\!e^{3} \,= \,\frac{1}{e^3}$
The maximum area is: .$\displaystyle A \:=\:\frac{1}{2}(1)\left(\frac{1}{e^3}\right) \:=\:\boxed{\frac{1}{2e^3}\text{ square units}}$