How to differentiate the function (cost function)
$$C(x)=V\left(\frac{px-W}{q}\right)$$
where $W,p,q$ are constants,and $W$ representing the consumer's budget or wealth.
$V$ is a function of $x$.
Please explain me how to obtain the first and second derivatives of $C(X)$
To differentiate $C(x)$ you have to apply the chain rule.
$$C'(x)= V'\left(\frac{px-W}{q}\right)\cdot\left(\frac{px-W}{q}\right)' = V'\left(\frac{px-W}{q}\right)\cdot\frac{p}{q}$$
For the second derivitive again:
$$C''(x) = \left(C'(x)\right)' = \left(V'\left(\frac{px-W}{q}\right)\cdot\frac{p}{q}\right)' = V''\left(\frac{px-W}{q}\right)\cdot\frac{p^2}{q^2}$$