My lecture notes give the following:
Consider the PDE $\dfrac{ \partial{u(x, t)} }{ \partial{t}} = 2t$.
Writing this as $\dfrac{ \partial }{ \partial{t}} (u(x, t) - t^2) = 0$,
we see that $u(x, t) - t^2$ must not vary in time and hence solutions of this PDE must be of the form $u(x, t) = t^2 + A(x)$, where $A(x)$ is an arbitrary function.
To make the solution unique, we need more information, in this a boundary condition of the form $u(x, 0) = g(x)$,
so that the unique solution to the PDE with the associate boundary (initial) condition is $u(x, t) = t^2 + g(x)$.
I'm not sure where $\dfrac{ \partial }{ \partial{t}} (u(x, t) - t^2) = 0$ came from?
I tried to derive these calculations as follows:
$\dfrac{ \partial{u(x, t) } }{ \partial{t} } = 2t$
$\therefore \int \dfrac{ \partial{u(x, t) } }{ \partial{t} } \ dt = \int 2t \ dt$
$\rightarrow u(x, t) = t^2 + A(x, t)$ (ERROR: this should be $A(x)$, as per Botond's comment!!!)
$\rightarrow u(x, t) - t^2 = A(x, t)$
$\therefore \dfrac{ \partial }{ \partial{t} } (u(x, t) - t^2) = \dfrac{\partial}{\partial{t}} A(x, t)$
So I got $\dfrac{\partial}{\partial{t}} A(x, t)$, whereas the lecture notes have $0$.
I would greatly appreciate it if people could please take the time to review this. Am I misunderstanding something? Or is there an error in the lecture slides?
It is as Bernard wrote in the comments: $\frac{\partial}{\partial t}t^2 = 2t$. Hence, you get $$ \frac{\partial}{\partial t}u(x,t)=2t\Leftrightarrow \frac{\partial}{\partial t}u(x,t)=\frac{\partial}{\partial t}t^2\Leftrightarrow \frac{\partial}{\partial t}u(x,t)-\frac{\partial}{\partial t}t^2=0\Leftrightarrow \frac{\partial}{\partial t}\left(u(x,t)-t^2\right)=0. $$ At the last step, you use that the derivative is a linear operator.
In your argument, there is a mistake at $$ \int 2tdt = t^2+A(x,t). $$ The function $A$ can't depend on $t$. You might think of the additive constant at the integration. But it is a constant wrt the integration variable (in this case $t$). On the other hand, the constant can depend on the remaining variables, like $x$ in your example. So, you should write $$ \int 2t~dt = t^2+A(x) $$ such that $A$ just depends on $x$. Naturally, so get $\frac{\partial}{\partial t}A(x)=0$ as you need.