In my assignment of Laplace transforms, I have been given the task to evaluate the integral $$\int_{0}^{t}\frac{e^{-x}\sin(x)}{x}dx$$ The case when $t\to \infty$ can be easily tackled. But for any $t>0$, it seems rather absurd and tedious, and not at all related to Laplace transform. Here's what I have done.
$$\begin{aligned} I=\int_{0}^{t}\frac{e^{-x}\sin(x)}{x}dx&=\int_{0}^{t}\sum_{r=0}^{\infty}\frac{(-1)^{r}x^{r}}{r!}\frac{\sin(x)}{x}dx \\ &=\sum_{r=0}^{\infty}\frac{(-1)^{r}}{r!}\int_{0}^{t}x^{r-1}\sin(x)dx \end{aligned}$$
Now, using Integration by Parts, I arrived at the following result. $$\int_{0}^{t}x^{r-1}\sin(x)dx=\sum_{i=0}^{r-1}(-1)^{i}i!{r-1\choose i}t^{r-1-i}\sin\left(t+\frac{\pi}{2}(1+i)\right)$$ $$I=\sum_{r=0}^{\infty}\frac{(-1)^{r}}{r!}\sum_{i=0}^{r-1}(-1)^{i}i!{r-1\choose i}t^{r-1-i}\sin\left(t+\frac{\pi}{2}(1+i)\right)$$
Is there some way to solve this, and is the above evaluation correct. Thanks in advance.
While also not a Laplace transform, try using the real and imaginary part of $e^{ix}$ and splitting integrals:
$$\int_0^t \frac{\sin(x)}{xe^x}dx=\int_0^t\frac{\frac i2(e^{-ix}-e^{ix})}{xe^x}dx=\frac i2\left(\int_0^t \frac {e^{-(i+1)x}}xdx-\int_0^t \frac{e^{(i-1)x}}xdx\right)$$
Using the Exponential Integral $\text{Ei}(x)$:
$$\frac i2\left(\int_0^t \frac {e^{-(i+1)x}}xdx-\int_0^t \frac{e^{(i-1)x}}xdx\right)=\begin{cases}\frac i2(\text{Ei}(-(1+i)t)-\text{Ei}((i-1)t)-\frac{3\pi}4,t>0\\ \frac i2(\text{Ei}(-(1+i)t)-\text{Ei}((i-1)t)+\frac\pi4,t<0\end{cases}$$
where the integration is correct. The indefinite integral looks like a sine integral or a cosine integral function, but I could not get it into those forms. Also, the cases at the very end are due to $$\lim_{x\to0^\pm} \text{Ei}(-(1+i)x)-\text{Ei}((i-1)x)$$ having different results based on if $x<0$ or $x>0$ respectively. If you really want a series expansion, then just expand $e^x$ into one and integrate for $t>0$ to have positive terms:
$$\int \frac{e^{ax}}x dx=\int \frac 1x+\sum_{n=1}\frac{x^{n-1}}{n!}dx=C+\ln(x)+\sum_{n=1}^\infty \frac{x^n}{nn!}$$