<s>[INST] Differentiation of a function We need to find out the derivative $\frac{dy}{dx}$ of the following:
$x^m$$y^n$=$(x+y)^{m+n}$

*

*I know how to differentiate the function and on solving we get $\frac{dy}{dx}$=$\frac{y}{x}$. But we notice that $\frac{dy}{dx}$ is independent of values of $m$ and $n$. So what I did was again starting the problem from start but this time substituting any arbitrary values of $m$ and $n$, like $m$=$n$=$1$ (lets say). That is we get $xy$=$(x+y)^2$. Now opening the square bracket and solving we get

$x^2+y^2+xy=0$
So $\frac{dy}{dx}$=$\frac{-2x-y}{2y+x}$
But the answer should be $\frac{y}{x}$.Whats wrong in assuming arbitrary values of $m$ and $n$ if the answer dosen't depend upon values of $m$ and $n$.Please help.
How I got $\frac{dy}{dx}$=$\frac{y}{x}$?
$x+y$=$x^\frac{m}{m+n}$$y^\frac{m}{m+n}$
$ln(x+y)$=$\frac{m(ln(x))}{(m+n)}$+$\frac{n(ln(y))}{(m+n)}$
Differentiating we get
$\frac{1}{x+y}$.$(1+\frac{dy}{dx})$=$\frac{m}{(m+n)x}$+$\frac{n}{(m+n)y}\frac{dy}{dx}$
$\frac{dy}{dx}(\frac{1}{x+y}-\frac{n}{(m+n)y})$=$\frac{m}{(m+n)x}-\frac{1}{x+y}$
Just rearrange and you are done $\frac{dy}{dx}$=$\frac{y}{x}$
 [/INST] I'm not quite sure how you got $\frac{dy}{dx}=\frac yx$.  You should instead have
$$\frac d{dx}x^my^n=mx^{m-1}y^n+nx^my^{n-1}\frac{dy}{dx}$$
$$\frac d{dx}(x+y)^{m+n}=(m+n)(x+y)^{m+n-1}\left(1+\frac{dy}{dx}\right)$$
Put these two together and we get
$$mx^{m-1}y^n+nx^my^{n-1}\frac{dy}{dx}=(m+n)(x+y)^{m+n-1}\left(1+\frac{dy}{dx}\right)$$
Expand a bit:
$$mx^{m-1}y^n+nx^my^{n-1}\frac{dy}{dx}=(m+n)(x+y)^{m+n-1}+(m+n)(x+y)^{m+n-1}\frac{dy}{dx}$$
Group the $\frac{dy}{dx}$ terms:
$$\left(nx^my^{n-1}-(m+n)(x+y)^{m+n-1}\right)\frac{dy}{dx}=(m+n)(x+y)^{m+n-1}-mx^{m-1}y^n$$
Divide both sides:
$$\frac{dy}{dx}=\frac{(m+n)(x+y)^{m+n-1}-mx^{m-1}y^n}{nx^my^{n-1}-(m+n)(x+y)^{m+n-1}}$$
and I'm fairly certain this does not equal $\frac yx$.  It does simplify a little though:
$$(x+y)^{m+n-1}=\frac{x^my^n}{x+y}$$
$$\frac{dy}{dx}=\frac{(m+n)\frac{x^my^n}{x+y}-mx^{m-1}y^n}{nx^my^{n-1}-(m+n)\frac{x^my^n}{x+y}}$$
Divide the numerator and denominator by $x^my^n$ to get
$$\frac{dy}{dx}=\frac{\frac{m+n}{x+y}-mx^{-1}}{ny^{-1}-\frac{m+n}{x+y}}$$
Now simplify the fractions:
$$\frac{dy}{dx}=\frac{(m+n)xy-my(x+y)}{nx(x+y)-(m+n)xy}$$
Expand and cancel like terms:

$$\frac{dy}{dx}=\frac{nxy-my^2}{nx^2-mxy}$$

</s>