# Derivative of an implicit trigonometric function

I was doing my homework which included finding the derivative of implicit function. One of them was

$$3\sin(xy)+ 4\cos(xy) = 5$$

On first attempt I did this as follows

$$\frac{d}{dx}(3\sin(xy)+ 4\cos(xy)) = \frac{d}{dx}(5)$$ $$[3\cos(xy)-4\sin(xy)][y+x\frac{dy}{dx}] = 0$$ $$\frac{dy}{dx}= \frac{-y}{x}$$

It matched the answer and I was happy. I don't know why but I wrote the original expression as this

$$\frac{3}{5}\sin(xy)+ \frac{4}{5}\cos(xy) = 1$$ $$\cos(\alpha)\sin(xy)+ \sin(\alpha)\cos(xy) = 1$$ $$\sin(xy +\alpha)=1 \quad \quad \textrm{where} \quad\alpha = \arccos(\frac{3}{5})$$

Again from step 2 of finding derivative,

$$[3\cos(xy)-4\sin(xy)][y+x\frac{dy}{dx}] = 0$$ $$[\frac{3}{5}\cos(xy)-\frac{4}{5}\sin(xy)][y+x\frac{dy}{dx}] = 0$$ $$[\cos(\alpha)\cos(xy)-\sin(\alpha)\sin(xy)][y+x\frac{dy}{dx}] = 0$$ $$[\cos(xy +\alpha)][y+x\frac{dy}{dx}] = 0$$

Since $$\sin(xy +\alpha) =1 \implies \cos(xy+\alpha)=0$$ what did in finding the derivate while going from step 2 to 3 was diving by zero which is not valid. So I cannot actually conclude that the derivative is $$\frac{-y}{x}$$. But then why is the answer right(wolfram alpha says this too)? Is there any other way of finding this derivate?

• What if you divide by (say) 10 instead of 5? Then you would get $\sin(xy+\beta)=1/2$ with $\beta=\arccos(3/10)$ and $\cos(xy+\beta)=\pm \sqrt 3/2$ so it doesn't vanish. Commented Aug 20, 2022 at 12:47
• So, @Brightsun what did I do wrong here? Commented Aug 20, 2022 at 12:48
• Nothing wrong, I was just noting that if you choose another constant (10 instead of 5) the problem'' is no longer there. Actually, the new answers show that even if you land on $\cos(xy+\alpha)=0$ then the derivative still follows as you would like it, so there is no problem even if you choose 5. Commented Aug 21, 2022 at 14:03
• Using Pythagoras and squaring I get $$0=(3-5\sin(xy))^2$$ for the implicit function. Commented Aug 21, 2022 at 17:34
• @Brightsun $3/10$ and $4/10$ can not be the sine and cosine of same angle. Commented Aug 23, 2022 at 5:06

From $$\sin(xy + \alpha) = 1$$, you can achieve that $$xy + \alpha \in \{2k\pi + \frac{\pi}{2}\ |\ k \in \mathbb{Z}\}$$ for all $$x, y$$. But $$xy + \alpha$$ is a continuous function of $$x$$ and thus, if its range is included in a discrete set, it must be constant. So $$xy + \alpha = C$$. Therefore, $$y + xy' = 0$$ and $$y' = \frac{-y}{x}$$.

• But for that constant C , $\cos(xy + \alpha) = 0$, then how can we imply $y' = \frac{-y}{x}$ Commented Aug 20, 2022 at 13:04
• @VedantChhapariya I achieved $y + xy' = 0$ by differentiating $xy + \alpha = C$. There's no need to $\cos(xy + \alpha)$. Commented Aug 20, 2022 at 13:10
• Oh yeah i got it. Thank u so much Commented Aug 20, 2022 at 13:26

Your problem is not suited for a direct application of the IFT. The function $$f(x,y)=3\sin(xy) + 4\cos(xy) -5$$ is smooth but if $$f$$ has a zero at $$P(x_0,y_0)$$ then as shown by your calculation $$\partial_x f_{|P}= \partial_y f_{|P}=0$$ so a priori you can not apply the IFT.

The function $$f(x,y)=g(xy)=5 (\cos(xy+\alpha)-1)$$ has isolated zeros when $$xy+\alpha = 2\pi k$$, $$k\in {\Bbb Z}$$ which leads to the wanted solution for the derivative but $$g$$ has zero derivative at the solution. If you replace the constant 5 on the RHS of your equation by any $$c\in (-5,5)$$ you do not run into this problem and the IFT works fine ok.

• What is IFT? I haven't studied that yet Commented Aug 20, 2022 at 13:04
• Sorry, IFT = Implicit Function Theorem Commented Aug 20, 2022 at 13:05
• I haven't studied that yet Commented Aug 20, 2022 at 13:06
• OK, without that theorem I think it is difficult to get a reasonable mathematical foundation for treating this type of problem apart from writing down the solution explicitly $xy+\alpha = const$. Commented Aug 20, 2022 at 13:10

You didn't divide by zero. The reasoning is really "$$AB = 0$$ implies either $$A=0$$ or $$B=0$$". Then you can consider the cases $$A=0$$ and $$A\neq 0$$ separately. If $$A\neq 0$$, then it must be that $$B=0$$ (because then you can divide by the nonzero $$A$$) and you go on from there.

• yeah, you are right if A is non zero in equation $AB = 0$, then definitely $B = 0$. But here $A = 0$, then i can not comment anything about B Commented Aug 20, 2022 at 12:35