I'm trying to solve a differential equation as in the following code:
FullSimplify[DSolve[x'[t] == a + b E^(g t) + (c + d E^(-g t)) x[t], x[t], t]]
which generates
Now, I would like to plot it with specific parameter values assigned, for example: a = 1; b = 2; c = 3; d = 4; g = 0.1; A = 1
where I replaced the integration constant c_1
with A
.
Here is my code for plotting x[t]
:
a = 1; b = 2; c = 3; d = 4; g = 0.1; A = 1
x[t_] := E^(-((d E^(-g t))/g) + c t) (A + Integrate[E^((d E^(-g K[1]))/g - c K[1]) (a + b E^(g K[1])), {K[1], 1, t}])
Plot[x[t], {t, 1, 10}]
It runs forever. To check whether Mathematica is doing calculations, I tried
x[1]
and it yielded
3.83926*10^-15
which is nice. But when I tried
x[2]
I got
It seems Mathematica cannot compute the integral unless the integration region is $\int_1^1$. Is this because the integrand is too complicated? Is there any way to let Mathematica compute it? Thanks!