2

I have asked this questions: Change of variables in differential equation?

...but after thinking about it, I am still a little confused of how to rigorously use the chain rule to calculate the derivative(s) of a function for a change of variable.

I have the following derivative:

$f(x) = \frac{dw(x)}{dx}$

Now I introduce the change of variable: $\hat{x}=\frac{x}{L}$ and I apply the chain rule:

  1. I write: $g(\hat{x}) = L \hat{x} = x$
  2. I substitute: $f(g(\hat{x})) = \frac{dw(g(\hat{x}))}{d(g(\hat{x}))}$

...but this does not help me... I am confusing something.

I would be glad, if someone could show me in detail and step by step how to do this rigorously.

Thanks a lot.

james
  • 303

1 Answers1

1

Let's say you want to change $x$ for $y$, where $y$ is a function of $x$, i.e., $y=g(x)$. I will use $y$ for the nondimensional variable because it's way easier to type in my phone. The chain rule tells us that if we want to calculate the derivative $$\frac{df}{dx}$$ in terms of $y$, we need to use the formula $$\frac{df}{dx}=\frac{dy}{dx}\frac{df}{dy}.$$ The $dy/dx$ part is equal to $dg(x)/dx$, therefore, $$\frac{df}{dx}=\frac{dg(x)}{dx}\frac{df}{dy}.$$ See that it works for any possible change of variables. In your particular case, $g(x)=x/L$ and $dg/dx=1/L$. Therefore, we have $$\frac{df}{dx}=\frac{1}{L}\frac{df}{dy}.$$ It leads to $$\frac{df}{dy}=Lw(g^{-1}(y)),$$ in which $g^{-1}(y)=Ly$. Finally: $$\frac{df}{dy}=Lw(Ly).$$ It's up to you to show that this equation is dimensionally consistent. Remember: $L$ has the same dimension of $x$ and $y$ is nondimensional. Let me know if you have any question.

rafa11111
  • 1,514
  • 2
  • 10
  • 19
  • Many thnaks for your answer. There is one thing that I don't understand, if I take $\frac{df}{dx}=\frac{1}{L}\frac{df}{dy}.$ and I know that $\frac{df}{dy} = Lw(Ly)$, then the final result is: $\frac{df}{dx} = w(Ly)$... ? – james Dec 15 '18 at 21:03
  • @james You are right, but I can't see how this is useful. In general, one has the dimensional form of an equation and then obtains the nondimensional form of it. It's useful then to have "consistency" the variables, in the sense that you use only $x$ or only $y$; since they mean the same thing (say, the dimensional and nondimensional distance, respectively), you won't want to mix them. Therefore, while $df/dx=w(Ly)$ is true, I think that $df/dy=Lw(Ly)$ is far more useful. – rafa11111 Dec 15 '18 at 23:55
  • I see. Okay, so if I apply the change of variable to the following integral $\int _ { - \frac { L } { 2 } } ^ { \frac { L} { 2 } } w ^ { \prime } ( x ) ^ { 2 } d x$, I would get: $\int _ { - \frac { 1 } { 2 } } ^ { \frac { 1} { 2 } } \frac{1}{L^2} w ^ { \prime } ( L\hat{x} ) ^ { 2 } L d \hat{x}$, right ? – james Dec 16 '18 at 09:12
  • @james Precisely! – rafa11111 Dec 16 '18 at 10:46
  • Thank you so much for your help ! – james Dec 16 '18 at 13:28
  • @rafa11111 $$\int _ { - \frac { L } { 2 } } ^ { \frac { L} { 2 } } w ^ { \prime } ( x ) ^ { 2 } d x=\int _ { - \frac { 1 } { 2 } } ^ { \frac { 1} { 2 } } \frac{1}{L^2} w ^ { \prime } ( L\hat{x} ) ^ { 2 } L d \hat{x}$$ doesn't seem quite right. $\displaystyle w'(L\hat x)=\frac{dw(L\hat x)}{d(L\hat x)}$, so the $1/L$ factor is already there. – Shubham Johri Dec 23 '18 at 19:21
  • @ShubhamJohri It should be, more precisely, $$\int_{-L/2}^{L/2} \left(\frac{dw(x)}{dx} \right)^2 dx = \int_{-1/2}^{1/2} \left(\frac{dw(L \hat{x})}{L d\hat{x}} \right)^2 Ld\hat{x},$$ since the prime symbol means differentiation in relation to different variable in the LHS and RHS. In the LHS, $$w' = \frac{dw}{dx}$$ and, in the RHS, $$w' = \frac{dw}{d\hat{x}}.$$ You can see that the equation is right using dimensional analysis: if $w$ is temperature, for example, $w'$ in the LHS has units of K/m$^2$ and the LHS has units of K/m, and so does the RHS, although there $w'$ has units of K. – rafa11111 Dec 23 '18 at 19:34
  • In the $RHS$, the prime symbol means differentiation with respect to $L\hat x$, because that is the argument of $w'$. Recall how $[f(g(y))]'=f'(g(y))\cdot g'(y)$. The prime in the first term means differentiation with respect to $g(y)$, the argument of $f$ – Shubham Johri Dec 23 '18 at 19:38
  • @ShubhamJohri It's a matter of convention, I guess... – rafa11111 Dec 23 '18 at 19:43