# How do you find dy/dx by implicit differentiation of (sinpix+cospiy)^2=2?

Jan 27, 2017

#### Explanation:

Given: ${\left(\sin \left(\pi x\right) + \cos \left(\pi y\right)\right)}^{2} = 2$

Differentiate:

$\frac{d \left({\left(\sin \left(\pi x\right) + \cos \left(\pi y\right)\right)}^{2}\right)}{\mathrm{dx}} = \frac{d \left(2\right)}{\mathrm{dx}}$

Use the chain rule on $\frac{d \left({\left(\sin \left(\pi x\right) + \cos \left(\pi y\right)\right)}^{2}\right)}{\mathrm{dx}}$

The chain rule is:

$\frac{d \left(g \left(h \left(x , y\right)\right)\right)}{\mathrm{dx}} = \frac{\mathrm{dg}}{\mathrm{dh}} \frac{\mathrm{dh}}{\mathrm{dx}}$

let $h \left(x , y\right) = \sin \left(\pi x\right) + \cos \left(\pi y\right)$, then:

$\frac{\mathrm{dh}}{\mathrm{dx}} = \pi \cos \left(\pi x\right) - \pi \sin \left(\pi y\right) \frac{\mathrm{dy}}{\mathrm{dx}}$

$g = {\left(h \left(x , y\right)\right)}^{2}$

$\frac{\mathrm{dg}}{\mathrm{dh}} = 2 h \left(x , y\right)$

$\frac{d \left({\left(\sin \left(\pi x\right) + \cos \left(\pi y\right)\right)}^{2}\right)}{\mathrm{dx}} = 2 h \left(x , y\right) \left(\pi \cos \left(\pi x\right) - \pi \sin \left(\pi y\right) \frac{\mathrm{dy}}{\mathrm{dx}}\right)$

$\frac{d \left({\left(\sin \left(\pi x\right) + \cos \left(\pi y\right)\right)}^{2}\right)}{\mathrm{dx}} = 2 \left(\sin \left(\pi x\right) + \cos \left(\pi y\right)\right) \left(\pi \cos \left(\pi x\right) - \pi \sin \left(\pi y\right) \frac{\mathrm{dy}}{\mathrm{dx}}\right)$

The right side is just derivative of a constant:

$\frac{d \left(2\right)}{\mathrm{dx}} = 0$

Put the terms back into the equation:

$2 \left(\sin \left(\pi x\right) + \cos \left(\pi y\right)\right) \left(\pi \cos \left(\pi x\right) - \pi \sin \left(\pi y\right) \frac{\mathrm{dy}}{\mathrm{dx}}\right) = 0$

Solve for $\frac{\mathrm{dy}}{\mathrm{dx}}$

$- \cos \left(\pi x\right) + \sin \left(\pi y\right) \frac{\mathrm{dy}}{\mathrm{dx}} = 0$

$\sin \left(\pi y\right) \frac{\mathrm{dy}}{\mathrm{dx}} = \cos \left(\pi x\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = \cos \frac{\pi x}{\sin} \left(\pi y\right)$