Is it possible to solve the following differential equation using Laplace Transforms? With initial condition $x(1)=\frac{1}{2}$, solve the differential equation $t\frac{dx}
{dt}+x=t$
$t\frac{dx}{dt}+x=t$
we know that, $L[t\frac{dx}{dt}]=-\frac{d(sX(s)-x(0))}{ds}$
$-\frac{d(sX(s)-x(0))}{ds}+X(s)=\frac{1}{s^2}$
$-\frac{d(sX(s)-x(0))}{ds}+X(s)=\frac{1}{s^2}$
$-X(s) +s\frac{d{X(s)}}{ds}+X(s)=\frac{1}{s^2}$
$s\frac{d{X(s)}}{ds}=\frac{1}{s^2}$
$\frac{d{X(s)}}{ds}=\frac{1}{s^3}$
On integrating both the sides we have,
$X(s)=\frac{-1}{2s^2}+c$
 A: Solve the differential equation:
$$\tag 1 t\dfrac{dx}{dt}+x=t, x(1) = \dfrac{1}{2}$$
Approach 1: Laplace Transforms
We have:


*

*$\mathscr{L} (t x') = - \dfrac{d}{ds}(s x(s) - x(0)) = -s x'(s) - x(s)$

*$\mathscr{L} (x) = x(s)$

*$\mathscr{L} (t) = \dfrac{1}{s^2}$


This gives us: $x'(s) = -\dfrac{1}{s^3}$, so, $x(s) = \dfrac{1}{2s^2} + c$, thus:
$$x(t) = \mathscr{L}^{-1} (x(s)) = \dfrac{t}{2} + c ~\delta(t)$$
Where $\delta(t)$ is the Dirac Delta Function.
Now, we have the IC, $x(1) = \dfrac{1}{2}$, so:
$$x(1) = \dfrac{1}{2} + c~ \delta(1) = \dfrac{1}{2} \rightarrow c = 0$$
Thus:
$$x(t) = \dfrac{t}{2}$$
Approach 2: Reverse Product Rule
However, we can solve this using another method. We can write $(1)$ as:
$$\dfrac{d}{dt}(t x) = t$$
Integrating both sides with respect to $t$, yields:
$$t x = \dfrac{t^2}{2} + c \rightarrow x(t) = \dfrac{t}{2} + \dfrac{c}{t}$$
Using the IC yields $c = 0$, thus:
$$x(t) = \dfrac{t}{2}$$
Of course, this is the same as we got with the first approach. 
I prefer the second approach as the first can lead to all sorts of unforeseen issues.
A: In agreement with the answer above, the second method is definitely best.
But, if what we're really examining is if the first method can be rigourously applied here, something interesting arises.
$ \delta(1) = 0 $, so $ \frac{1}{2} + c \delta(1) = \frac{1}{2} $ does not assert anything about c, it just works to set c to zero because your initial condition is lucky. If you had $ x(1) = \frac{3}{2} $ (or anything other than $ \frac{1}{2} $, really), you would have to satisfy the equation $ \frac{1}{2} + c \delta(1) = \frac{3}{2} \implies c \delta(1) = 1 $, which cannot be done. Yet there is clearly a valid solution with this initial condition if you follow the other method.
If the original DE were shifted so as to solve for $ y(t) = x(t + 1) $, moving the initial condition to $ t = 0 $, then I'm fairly sure that would allow you to eliminate the delta function, but I'm not so sure it would clear up the issue of only having solutions for the lucky initial condition. Let's see.
Define $ y(t) $ as above, and sending $ t $ to $ t+1 $, the ~equavalent DE obtained is:
$ (t+1) \frac{dy}{dt} + y = t + 1 \implies t \frac{dy}{dt} + \frac{dy}{dt} + y = t + 1 $
Applying the Laplace transform:
$ (-s Y'(s) - Y(s)) + (sY(s) - y(0)) + Y(s) = \frac{1}{s^2} + \frac{1}{s} $
$ -s Y'(s) + sY(s) - x(1) = \frac{1}{s^2} + \frac{1}{s} $
$ Y(s) -Y'(s) = \frac{1}{s^3} + \frac{1}{s^2} + x(1) \frac{1}{s} $
Let $ k $ be our initial condition $ x(1) $.
This DE has solution:
$ Y(s) = c e^s + (\frac{1}{2}-k) e^s Ei(-s) + \frac{1}{2 s^2} + \frac{1}{2s} $, where $ Ei(t) $ is the Exponential integral.
The inverse transform of Y(s) follows:
$ y(t) = c \delta(t+1) u(t + 1) + (k - \frac{1}{2}) \frac{1}{t + 1} + \frac{t}{2} + \frac{1}{2} $, where $ u(t) $  is the Heaviside step function.
Let $ t = 0 $. $ \implies y(0) = c \delta(1) u(1) + (k - \frac{1}{2}) + \frac{1}{2} = c(0)(1) + k = k $
So this always satisfies its initial condition, but does not seem to eliminate the delta function. To do so, one could assert everywhere differentiability of x and it would follow simply, or otherwise just accept the wider family of solutions. With $ k = \frac{1}{2} $, the result simplifies to:
$ y(t) = c \delta(t+1) u(t + 1) + \frac{t+1}{2} = x(t+1) \implies x(t) = c \delta(t) u(t) + \frac{t}{2} $
I think the lesson to be taken away from this is that application of Laplace transforms assumes your initial conditions are very literally initial; occurring where $ t $ is zero. Though a better lesson may be to avoid Laplace transforms when there are simpler methods.
