How do I solve a first order differential equation of the following form If I had a differential equation $x'(t) + \frac{x(t)}{t} = e^{t^2}$
And I have a question saying solve the following first ODE for $x(t)$ how would I go about doing this?

This is a linear differential equation so first let's find the solution to the homogenous equation. We see that $x(t)=A\exp(-\ln(t))=\frac{A}{t}$ where $A$ is a constant. Using a well-known method, we suppose that $A=A(t)$, so we have $x(t)=\frac{A(t)}{t}$. Using the equation, we get$$
A'(t)=t \exp(t^2)
$$
so $A(t) = \frac{\exp(t^2)}{2}+C$ where $C$ is a constant. Thus
$$
x(t)=\frac{\exp(t^2)}{2t}+\frac{C}{t}.
$$
