# Differential Equation solution?

Hello I solved the differential equation $$x'=-\frac{x}{t}+\ln(t)$$ and my solution was

$$x=-ct+\frac{t\ln^2 t}{2}$$

However if I type this equation in Wolfram Alpha, the solution is different from mine. Can someone please verify my answer or correct me?

Thanks, Ciwan

• Plug your solution in the equation !
– user65203
May 23 '19 at 15:21
• For your solution you need the other sign, as $(\frac{x}{t})'=\frac{x'}t-\frac{x}{t^2}$, so that you would need $x'=+\frac{x}{t}+...$. May 23 '19 at 15:26
• Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax. May 23 '19 at 15:27

$$x'=-\frac{x}{t}+\ln(t)\implies t x'+x=t\ln (t) \implies t dx + x dt= t\ln (t) dt$$
$$xt=\int t\ln (t) dt=\ln (t) \int t dt -\int[\frac{d}{dt} \ln(t) \int t dt] dt= \frac{t^2}{2}\ln(t)-\int \frac{1}{t} \frac{t^2}{2} dt=\frac{t^2}{2}\ln(t)-\frac{t^2}{4}+c$$
$$\implies x=\frac{t}{2}\ln(t)-\frac{t}{4}+ct^{-1}$$