Find tangent plane of level surface of $f(x, y, z)= \cos(x^2+2y+3z)$ at $(\frac{\pi}{2}, \pi, \pi)$ I was wondering if someone could verify my solution to this problem. As stated in the title, I was requested to find the equation for the tangent plane of the level surface of $f(x, y, z)= \cos(x^2+2y+3z)$ at $(\frac{\pi}{2}, \pi, \pi)$. Here is what I did.
$I$. Firstly I computed the partial derivatives of $f$, which make up the gradient $\triangledown f$ = $<f_x, f_y, f_z>$.

*

*$f_x(x, y, z) = -2x\sin(x^2+2y+3z)$

*$f_y(x, y, z) = -2\sin(x^2+2y+3z)$

*$f_z(x, y, z) = -3\sin(x^2+2y+3z)$
$II$. Using the fact that $\triangledown f(\frac{\pi}{2}, \pi, \pi) \perp \vec{r}'(t_0)$ where $\vec{r}(t)$ is any curve that touches $P=(\frac{\pi}{2}, \pi, \pi)$ when $t=t_0$, we know the plane tangent to the level surface of $f$ will have a normal vector $\vec{n}=\triangledown f(\frac{\pi}{2}, \pi, \pi)$. Therefore the plane is given by
$$-\pi\sin(\frac{\pi^2}{4} +5\pi)(x-\frac{\pi}{2})-2\sin(\frac{\pi^2}{4} +5\pi)(y-\pi) -3\sin(\frac{\pi^2}{4} +5\pi)(z-\pi) = 0$$
Let $u=\sin(\frac{\pi}{4}+5\pi)$. Then we have
$$\begin{align} 
-\pi u(x-\frac{\pi}{2})-2u(y-\pi)-3u(z-\pi)&=0 \\ \pi ux+2uy+3uz&=u(\frac{\pi^2+10\pi}{2})
\end{align}$$
or rather
$$ \pi \sin(\frac{\pi^2}{4} +5\pi)x+2\sin(\frac{\pi^2}{4} +5\pi)y+3\sin(\frac{\pi^2}{4} +5\pi)z=\sin(\frac{\pi^2}{4} +5\pi)(\frac{\pi^2+10\pi}{2})$$

I wanted to know if my reasoning and my results are correct. I'm very new to multivariate calculus and am still trying to develop a grip of the basics. Thank you in advance.
 A: A bit of  background:

*

*If $f: \mathbf{R}^{n}\to \mathbf{R}$ is  differentiable function, $x_{0}\in {\rm Dom}(f)$ and $\nabla f(x_{0})\not=0$, then gradient vector $\nabla f(x_{0})$ is orthogonal to the level set $\{x\in \mathbf{R}^{n}: f(x)=c\}$ of passing through $x_{0}$. Then the tangent plane to surface $S$ defined by $f(x)=x_{0}$ at $x_{0}$ is just $\nabla f(x_{0})\cdot \vec{xx_{0}}=0$ for all $x\in \mathbf{R}^{n}$.

The level surface for $f$ is given by $f(x,y,z)=\cos(x^{2}+2y+3z)=k$ for $k\in {\rm Im}(f)$. Then,

*

*Indeed, $$\color{blue}{\nabla f\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{bmatrix}-2x\sin(x^{2}+2y+3z)\\-2\sin(x^{2}+2y+3z)\\-3\sin(x^{2}+2y+3z)\end{bmatrix}},$$
as you said.

*Then,
$$\color{blue}{\nabla f\begin{pmatrix} \pi/2\\ \pi\\\pi\end{pmatrix}=\begin{bmatrix}\pi\sin(\pi^{2}/4)\\2\sin(\pi^{2}/4)\\3\sin(\pi^{2}/4)\end{bmatrix}}$$

*Finally, the tangent plane of level surface $f$ at $(\pi/2,\pi,\pi)$ is given by
$$\begin{bmatrix}\pi\sin(\pi^{2}/4)\\2\sin(\pi^{2}/4)\\3\sin(\pi^{2}/4)\end{bmatrix}\cdot \begin{bmatrix}x-\frac{\pi}{2}\\ y-\pi\\z-\pi\end{bmatrix}=0,$$
i.e.,
$$\color{blue}{\pi\sin\left(\frac{\pi^{2}}{4}\right)\left(x-\frac{\pi}{2}\right)+2\sin\left(\frac{\pi^{2}}{4}\right)(y-\pi)+3\sin\left(\frac{\pi^{2}}{4}\right)(z-\pi)=0}.$$
