I am trying DSolve in Mathematica for an ODE. Here is the command I am trying and the result I get
DSolve[{x'[t] + y[t] x[t] == 0, x[0] == x0}, x[t], t]
$$ \left\{\left\{x(t)\to \text{x0} \exp \left(\int_1^t -y(K[1]) \, dK[1]-\int_1^0 -y(K[1]) \, dK[1]\right)\right\}\right\} $$
Why does Mathematica separate the integration between 0 and 1 and the rest? The answer as one would expect is
$$ x(t) = x0 \exp\left(-\int_0^t y(t') dt' \right) $$
How to get Mathematica to give the above result from DSolve?
Without the initial condition in the list of equations, I just get the integral from 1 to t.
Thanks for any help or suggestions!
PS: I searched for a solution and couldn't find one. If this was already addressed, please point me to relevant sources.