I have following expression -
$$ \sqrt{y\left(\frac{x}{z}\right)}ax + \sqrt{1-y\left(\frac{x}{z}\right)}bz $$
where a and b are constants. y is a variable which is a function of fraction $\dfrac{x}{z}$
I have to derivate the function with respect to ratio of variables, $\dfrac{x}{z}$
I took z variable out and tried to derivate the following but can't figure out how to handle $\dfrac{1}{z}$ outside the bracket
$$ \frac{1}{z} \left(\sqrt{y\left(\frac{x}{z}\right)}a\frac{x}{z} + \sqrt{1-y\left(\frac{x}{z}\right)}b \right) $$
Any way out or hint would be helpful.
It looks like this is intended to be a general expression with an unspecified function $ \ y \ \ . \ $ It may be more helpful to use $ \ u \ = \ \frac{x}{z} \ \rightarrow \ x \ = \ uz \ \ . \ $ The problem then becomes $$ \frac{d}{d(x/z)} \ \left[ \ ax·\sqrt{ \ y\left(\frac{x}{z}\right)} \ + \ bz·\sqrt{1-y\left(\frac{x}{z}\right)} \ \right] $$ $$ \rightarrow \ \ \frac{d}{du} \ \left[ \ a·(uz)· ( \ y (u) \ )^{1/2} \ + \ b·\left(\frac{x}{u}\right)·( \ 1 - y(u) \ )^{1/2} \ \right] $$ $$ = \ \ a·( z)· y^{1/2} \ + \ a·(uz)· \frac12· y^{-1/2}·\frac{dy}{du} $$ $$ + \ bx·\left(-u^{-2}\right)·( \ 1 - y \ )^{1/2} \ + \ b·\left(\frac{x}{u}\right)·\frac12·( \ 1 - y \ )^{-1/2}·\left(-\frac{dy}{du} \right) $$
$$ = \ \ az· y^{1/2} \ - \ \frac{bz^2}{x}·( \ 1 - y \ )^{1/2} \ + \ \frac12·\left[ \ \frac{ax}{\sqrt{y}} \ - \ \frac{bz}{\sqrt{\ 1 - y}} \ \right]·\frac{dy}{du} \ \ , $$ with $ \ y \ $ here still being understood as $ \ y(u) \ = \ y\left(\frac{x}{z}\right) \ $ and $ \ x \ , \ z \ $ taken to be independent variables.