A dealer purchases a certain number of articles at $x$ articles for a rupee and the same number at $y$ articles for a rupee. He mixes them together and sells at $z$ articles for a rupee. Then his gain or loss percentage$=([2xy-1]/z(x+y)) \times 100$; according to positive or negative sign
During my studies, i came across this formula. However, I believe this formula is not correct. My attempt gave me a different result, as given below.
cost price of $n$ objects having rate $x$ articles for a rupee $=\dfrac{n}{x}$
cost price of $n$ objects having rate $y$ articles for a rupee $=\dfrac{n}{y}$
So, total cost price of $2n$ articles $=\dfrac{n}{x}+\dfrac{n}{y}=\dfrac{n(x+y)}{xy}$
total selling price of $2n$ articles $=\dfrac{2n}{z}$
profit/loss = $\dfrac{2n}{z}-\dfrac{n(x+y)}{xy}=\dfrac{2nxy-nz(x+y)}{xyz}$
profit/loss percentage $=\dfrac{\dfrac{2nxy-nz(x+y)}{xyz} \times 100}{\dfrac{n(x+y)}{xy}}$ $=\dfrac{2xy-z(x+y)}{z(x+y)} \times 100$
Need your help in confirming whether the formula obtained as a result of my calculations is right or wrong. if i am wrong and the formula given by the site is right, please tell me why my calculations are wrong. thanks.