Find tangent to trigonometric function I want to find the tangent to the curve: 
$x\sin{y} + y\sin{x} = \frac{\pi}{4}(1+\sqrt{2})$
through the point $(\frac{\pi}{2}, \frac{\pi}{4})$
Now I know I can fill certain information into this formula
$y-y_0 = a(x-x_0)$ to get a tangent, but I dont really know how to find 
$a$ in this situation. How can I find the derivate here when I cant isolate $y$ on one side (that im aware of) ?
I tried to make an expression on the form $\sin(x+\theta) = \text{something}$ but without success
Thanks in advance for any help or hints
 A: Try with implicit differentiation, by taking derivatives with respect to $x$ we have:
\begin{align*}
\sin y+x\cos y\frac{dy}{dx}+\frac{dy}{dx}\sin x+y\cos x &=0\\
\left(x\cos y +\sin x\right)\frac{dy}{dx}&=-y\cos x-\sin y
\end{align*}
Then, the slope of the tangent line at $(\pi/2,\pi/4)$ is $$\frac{dy}{dx}_{(x,y)=(\pi/2,\pi/4)}$$
A: We will use implicit differentiation in this problem to extract $\frac{dy}{dx}$:
$$
x\sin{y}+y\sin{x}=\frac{\pi}{4}(1+\sqrt{2})\\
\cos{y}+x\frac{dy}{dx}\cos{y}+\frac{dy}{dx}\sin{x}+y\cos{x}=0\\
\frac{dy}{dx}(x\cos{y}+\sin{x})=-(\sin{y}+y\cos{x})\\
\frac{dy}{dx}=-\frac{\sin{y}+y\cos{x}}{x\cos{y}+\sin{x}}
$$
And for $x=\frac{\pi}{2}\quad y=\frac{\pi}{4}$ you get:
$$
a={\frac{dy}{dx}}_{(x,y)=(\frac{\pi}{2},\frac{\pi}{4})}=-\frac{2\sqrt{2}}{4+\pi\sqrt{2}}
$$
So the equation of the tangent becomes:
$$
y=-\frac{2\sqrt{2}}{4+\pi\sqrt{2}}x+C
$$
Since this is a tangent line it will pass from $(\frac{\pi}{2},\frac{\pi}{4})$:
$$
\frac{\pi}{4}=-\frac{2\sqrt{2}}{4+\pi\sqrt{2}}\frac{\pi}{2}+C\\
C=\frac{\pi}{4}+\frac{\pi\sqrt{2}}{4+\pi\sqrt{2}}
$$ 
And we finally get:
$$
y=-\frac{2\sqrt{2}}{4+\pi\sqrt{2}}x+\frac{\pi}{4}+\frac{\sqrt{2}\pi}{4+\sqrt{2} \pi}
$$
A: You need not bother about the constant, just differentiate implicitly left to right. My shorthand I suppose you can follow.
$$ s_y + x c_y y^{'} + y^{'} s_x + y \,c_x= 0 $$
$$ y^{'}=-\frac{s_{y}+y c_{x}}{x c_{y}+s_{x}} = yd $$ 
Evaluate it by plugging in $ x,y$ values to get yd
Plug the yd further into:
$$ \frac{y-y_1}{x-x_1} = yd. $$
and you are done.
