rewrite $\frac{\partial \theta}{\partial t}=k \frac{\partial^2 \theta}{\partial x^2}$ as a DE with two new variables $q_1$ and $q_2$ I am given the differential equation:
$$\frac{\partial \theta}{\partial t}=k \frac{\partial^2 \theta}{\partial x^2}$$
Use the change of variables $q_1(x,t) = \frac{x^2}{kt}$ and $q_2 (x,t)=\frac{\theta(x,t)\sqrt{kt}}{\theta_0}$ to rewrite the differential equation in terms of $q_1$, and $q_2$.
I asked a similar question to this a couple of days ago but with the help of my professor I got a bit further and am taking a different approach to the problem now and so I am posting this question.
Now
$$\frac{1}{\sqrt{kt}} = \frac{\sqrt{q_1}}{x}$$
$$\theta = \frac{q_2 \theta_0}{\sqrt{kt}}=\frac{q_2 \sqrt{q_1}}{x}\theta_0=\theta(q_1,q_2)$$
So up till here everything is fine but I can't seem to get the next step. I have to rewrite the original differential equation in terms of $q_1,q_2$, then assume that $q_2=f(q_1)$ and show that $f$ satisfies the ODE
$$4q_1 \frac{\partial ^2f}{\partial q_1^2}+(q_1+2) \frac{\partial f}{\partial q_1}+\frac{f}{2}=0$$
Whenever I try to rewrite the original differential equation I end up with enormously complicated expressions that are impossible to simplify and dont lead to the given differential equation for $f$ at all. I am sure there is some method or way to solve this but I really can't find. If anyone could help me I would be very grateful because I have been stuck on this for days. It is also weird to me because the other homework questions I got I solved fairly quickly after some messing about. Thanks in advance!
 A: Let $q_1=\dfrac{x^2}{kt},q_2=\dfrac{\theta\sqrt{kt}}{\theta_0}$ thus we have:$$\frac{\partial q_1}{\partial x}=\frac{2x}{kt}\\\frac{\partial q_1}{\partial t}=-\frac{x^2}{kt^2}\\\frac{\partial q_2}{\partial x}=\frac{\sqrt{kt}}{\theta_0}\frac{\partial\theta}{\partial x}\\\frac{\partial q_2}{\partial t}=\frac{\sqrt{k}}{2\theta_0\sqrt{t}}\theta_0+\frac{\sqrt{kt}}{\theta_0}\frac{\partial\theta}{\partial t}$$hence: $$\frac{\partial\theta}{\partial t}=\frac{\theta_0}{\sqrt{kt}}\left(\frac{\partial q_2}{\partial t}-\frac{\sqrt{k}}{2\theta_0\sqrt{t}}\theta\right)\\\frac{\partial\theta}{\partial x}=\frac{\theta_0}{\sqrt{kt}}\frac{\partial q_2}{\partial x}\\\frac{\partial^2\theta}{\partial x^2}=\frac{\theta_0}{\sqrt{kt}}\frac{\partial^2q_2}{\partial x^2}$$Hence substituting into our original equation we have:$$\frac{\theta_0}{\sqrt{kt}}\left(\frac{\partial q_2}{\partial t}-\frac{\theta\sqrt{k}}{2\theta_0\sqrt{t}}\right)=\frac{k\theta_0}{\sqrt{kt}}\frac{\partial^2q_2}{\partial x^2}\\\frac{\partial q_2}{\partial t}-\frac{\sqrt{k}}{2\theta_0\sqrt{t}}\theta=k\frac{\partial^2 q_2}{\partial x^2}$$Now notice we have $$\theta=\frac{\theta_0}{\sqrt{kt}}q_2\\\frac{\sqrt{k}}{2\theta_0\sqrt{t}}\theta=\frac1{2t}q_2$$giving us:$$\frac{\partial q_2}{\partial t}-\frac1{2t}q_2=k\frac{\partial^2 q_2}{\partial x^2}$$
Do you follow?
A: ${\large%
{\partial\theta \over \partial t} = k\, {\partial^{2}\theta \over \partial x^{2}}}
$
$\large\tt\mbox{Scaling:}\ $
$\large\theta \to \alpha\,\theta\,,\quad x \to \beta\,x\,,\quad
 t \to \gamma\,t$
$$
\Longrightarrow\
{\beta^{2} \over \gamma}\,{\partial\theta \over \partial t} = k\, {\partial^{2}\theta \over \partial x^{2}}
$$
The equation doesn't change its form whenever
$\beta = \sqrt{\vphantom{\large a}\gamma\,}\quad$
or/and $\quad{\beta x \over x} = \sqrt{\gamma t \over t\,}\quad$ or/and
$\quad{\beta x \over \sqrt{\gamma t\,}}
=
{x \over \sqrt{\vphantom{\large A}t\,}}$. That means that the change
$y = {x \over \sqrt{\vphantom{\large A}t\,}}$ should "simplify" the equation:
\begin{align}
{\partial \over \partial t}
&=
{\partial y \over \partial t}\,{{\rm d} \over {\rm d}y}
=
-\,{x \over 2\,t^{3/2}}\,{{\rm d} \over {\rm d}y}
=
-\,{y \over 2\,t}\,{{\rm d} \over {\rm d}y}
\\[3mm]
{\partial \over \partial x}
&=
{\partial y \over \partial x}\,{{\rm d} \over {\rm d}y}
=
{1 \over t^{1/2}}\,{{\rm d} \over {\rm d}y}
\quad\Longrightarrow\quad
{\partial^{2} \over \partial x^{2}}
=
{1 \over t}\,{{\rm d}^{2} \over {\rm d}y^{2}}
\end{align}
The "new" equation is given by:
$$
-\,{y \over 2t\,}{{\rm d}\theta \over {\rm d}y}
=
k\,{1 \over t}\,{{\rm d}^{2}\theta \over {\rm d}y^{2}}
\quad\Longrightarrow\quad
k\,{{\rm d}^{2}\theta \over {\rm d}y^{2}}
+
{y \over 2\,}{{\rm d}\theta \over {\rm d}y}
=
0
\quad\Longrightarrow\quad
{{\rm d} \over {\rm d}y}\left(%
{\rm e}^{y^{2}/2k^{2}}\,{{\rm d}\theta \over {\rm d}y}
\right)
=
0
$$
Then,
$$
{{\rm d}\theta \over {\rm d}y}
=
A\,{\rm e}^{-y^{2}/2k^{2}}\,,
\qquad
(~A\quad \mbox{is independent of}\quad y~).
$$
$$
\begin{array}{|c|}\hline\\
\color{#ff0000}{\large\quad%
\theta\left(y\right)
\color{#000000}{=}
\theta\left(y_{0}\right)
+
A\int_{y_{0}}^{y}{\rm e}^{-y\,'^{2}/2k^{2}}\,{\rm d}y'\quad
}
\\ \\ \hline
\end{array}
$$
