The task arises from physical situations (heat equation; distribution of heat in a given region over time). We have function $u$ of two variables: $u(x,t)$, where the variable $t$ represents time $t \geq 0$, the other variable $x$ is a location. Laplace transform of $u(x,t)$ is ${\scr L}[u(x,t)] = \int_0^{\infty}u(x,t)e^{-st}\ dt$, where paramater $x$ is treated as a constant. We still use capital letter to denote Laplace transform of a given function:

$$ {\scr L}[u(x,t)] = U(x,s) = U $$Since differential equation to solve can look like (examples)

$$ \begin{align} \frac{\partial u}{\partial x} + \frac{\partial u}{\partial t} &= x \hskip2em \text{or} \nonumber \\ \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial t^2} &= f(x), \nonumber \\ \end{align} $$we need Laplace transforms of corresponding derivatives—and these are analogy to Laplace transform of function $y(t)$.

$$
\begin{align}
\color{red}{{\scr L}\left[u_{t}(x,t)\right] = {\scr L}\left[\frac{\partial u}{\partial t}\right]} &\color{red}{= sU(x,s) - u(x,0)}, \label{ref:lapl_PDE1} \\
\color{red}{{\scr L}\left[u_{tt}(x,t)\right] = {\scr L}\left[\frac{\partial^2 u}{\partial t^2}\right]} &\color{red}{= s^2U(x,s) - su(x,0) -u_{t}(x,0)}. \label{ref:lapl_PDE2} \\
\end{align}
$$

Since we are transforming with respect to $t$, we further suppose it is legitimate to move ${\partial u}/{\partial x} $ to front of integral:

$$ {\scr L}\left[u_x(x,t)\right] = {\scr L}\left[\frac{\partial^2 u}{\partial x^2}\right] = \int_0^{\infty}e^{-st}\frac{\partial^2 u}{\partial x^2}dt = \frac{d^2}{dx^2}\int_0^{\infty}e^{-st}u(x,t)\ dt = \frac{d^2}{dx^2}{\scr L}\left[u(x,t)\right] $$So we will put

$$
\begin{align}
\color{red}{{\scr L}\left[\frac{\partial u}{\partial x}\right]} & \color{red}{= \frac{dU}{dx}}, \label{ref:lapl_PDE3}\\
\color{red}{{\scr L}\left[\frac{\partial^2 u}{\partial x^2}\right]} & \color{red}{= \frac{d^2U}{dx^2}}. \label{ref:lapl_PDE4}
\end{align}
$$

**The PDE will be converted into ordinary DE (ODE).**

$$
\frac{\partial u}{\partial x} + \frac{\partial u}{\partial t} = x\, \hskip2em x \gt 0,\ t \gt 0,\hskip2em u(x=0,t) = 0,\ u(x,t=0)=0
$$

We are given a partial differential equation (PDE). We solve by Laplace, so
we have to transform each term. **Transform is made with respect to time $\boldsymbol t$, the
other dimension $\boldsymbol x$ is considered to be a constant.** To transform $\partial u/\partial t$, it
is an analogy with $y'(t)=dy/dt$ and we use $(\ref{ref:lapl_PDE1})$. For
$\partial u/\partial x$, we drag $\partial /\partial x$ out of the integral, because the
transform proceeds over $t$, while differentiation is with respect to $x$
and then we have—according to $(\ref{ref:lapl_PDE3})$—${\scr L}[\partial u/\partial x] = d/dx\ U$ .

$u(x,0) = 0$ is given by boundary/initial conditions. We have converted PDE into ODE: the last equation can be solved as linear DE. Now dependent variable is $U$, independent is $x$. We are solving $U(x)$, $s$ is considered to be a constant.

$$ U' + sU = x \frac 1 s \implies P(x) = s \implies \mu(x) = e^{\int P(x)\ dx} = e^{\int s \ dx} = e^{sx} $$The linear DE are solved by identifying $P(x)$ in order to express integrating factor $\mu(x) = e^{\int P(x)\ dx}$. The integrating factor $\mu(x)$ is used to multiply DE and then it is easy to integrate, because on the left side is $d/dx\ \mu(x)y(x)$ or in current case $d/dx\ \mu(x)U(x)$.

$$ \begin{align} e^{sx}U' + e^{sx}sU &= s^{sx}x\frac 1 s \nonumber \\ \frac{d}{dx}e^{sx}U &= e^{sx}x\frac 1 s \nonumber \\ e^{sx}U &= \frac 1 s \cdot \frac{(sx-1)e^{sx}}{s^2}+c \nonumber \\ U(x,s) &= \frac 1 s \cdot \frac{sx-1}{s^2} +ce^{-sx} = \frac x {s^2} - \frac{1}{s^3} + ce^{-sx} \nonumber \end{align} $$The integral of $e^{sx}x$ is solved by integrating by parts. We use the product rule for differentiation backwards.

$$ (uv)' = u'v + uv' \implies u'v = (uv)' - uv' \implies \int u'v = uv- \int uv' $$Then we have to locate one term, which is easy to differentiate ($x$) and the second one, which is easy to integrate ($e^{sx}$).

$$ \begin{align} \int e^{sx}x\ dx &= \begin{vmatrix} u' = e^{sx} & u = \frac 1 s e^{sx}\\ v = x & v' = 1 \end{vmatrix} = \frac 1 s e^{sx}x - \int\frac 1 s e^{sx}\ dx = x\frac 1 s e^{sx} - \frac 1 {s^2}e^{sx} = \nonumber \\ &= \frac{(xs-1)e^{sx}}{s^2} \nonumber \end{align} $$We are used to evaluate arbitrary constants as $c$ here (product of integration) by applying initial/boundary values:

$$ \begin{align} &u(x=0,t) = 0 \implies U(x=0,s) = 0 \implies 0 = -\frac{1}{s^3} + c \implies c=\frac{1}{s^3} \implies \nonumber \\ \implies & U(x,s) = \frac x {s^2} - \frac{1}{s^3} + \frac{1}{s^3}e^{-sx} \nonumber \end{align} $$We reached the solution but it is in $s$ domain. Finally we have to go through inverse Laplace transform.

$$ \underline{\underline{u(x,t) = xt - \frac 1 2 t^2 + u(t-x)\cdot \frac 1 2 (t-x)^2}} $$Note: here notation $u(t-x)$ is equivalent of $u_x(t)$ and is unit step function (the product of inverse Laplace transform of $e^{-sx}$). The above solution is formally correct, but we should rather use the case form. The first two terms do not depend on any unit step function and are valid from zero to infinity. The last term, because of unit step function $u_x(t)$, is inactive until $t=x$:

$$ u(x,t) = \left\{ \begin{aligned} xt - \frac 1 2 t^2 & \hskip2em t \lt x \\ xt - \frac 1 2 t^2 + \frac 1 2 (t-x)^2 &\hskip2em t \geq x \end{aligned} \right. $$That can be further simplified to

$$ u(x,t) = \left\{ \begin{aligned} xt - \frac 1 2 t^2 & \hskip2em t \lt x \\ \frac 1 2 x^2 &\hskip2em t \geq x \end{aligned} \right. $$