# How to derive differential of a variable

Could you please explain the following two questions relating to differential of a variable.

1. In the method of integration by parts using substitution, we have $$u = f(x)$$, $$v = g(x)$$, $$du = f'(x)dx$$, and $$dv = g'(x)dx$$. Is it just a definition to assign those values to the differentials $$du$$ and $$dv$$ or is it based on some logics?

2. How could the highlighted differentials $$dt$$ $$du$$ in the below text be derived? I tried to use the method in (1) above but it didn't work out as I got $$sin\theta cos\theta (1 - r^2) + r(cos^2\theta - sin^2\theta)$$.

The point is that when you do substitution, you have $$\int g(f(x))\,f'(x)\,dx=\int g(v)\,dv$$ by taking $$v=f(x)$$. Then the formula suggest that $$f'(x)\,dx=dv$$. The formula for integration by parts, that comes from the derivative of a product, is $$\int f(x)\,g'(x)\,dx = f(x)g(x)-\int g(x)\,f'(x)\,dx.$$ With the above convention, and taking $$u=g(x)$$, you get $$\int u\,dv=uv-\int v\,du.$$
The second case has nothing to do with the above. The situation is that now you have a double integral. When you do substitution in a double integral, taking $$t=g(r,\theta),\ \ u=h(r,\theta),$$ the change of variable is given by $$dt\,du=\begin{vmatrix} \frac{\partial g}{\partial r}&\frac{\partial g}{\partial \theta}\\ \frac{\partial h}{\partial r}&\frac{\partial h}{\partial \theta}\end{vmatrix}\,dr\,d\theta.$$ For the particular choice of polar coordinates in your example, the above determinant (called the Jacobian) is $$r$$.
• Wow! First time ever I've seen differential of a variable involving determinant. Thanks, Martin. Just a quick clarification: did you mean $\int g(f(x))\,f'(x)\,dx=\int g(v)\,dv$ instead of $\int g(f(x))\,f'(x)\,dx=\int f(v)\,dv$? – Nemo Jan 24 at 4:42
Both t and u are functions of r and $$\theta$$. Form the matrix J whose first row is $$\nabla t$$ and whose second row is $$\nabla u$$. Then when we change the variables, we have the formalism of replacing the symbol $$dt du$$ by the symbol $$|\det(J)| dr d\theta$$ You can easily check that $$|\det(J)$$ \$ is r.