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$
Solve the differential equation:
$$\tag 1 t\dfrac{dx}{dt}+x=t, x(1) = \dfrac{1}{2}$$
Approach 1: Laplace Transforms
We have:
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.