I am going to use Nintegrate
to integrate the result of NDsolve
and also a Table
. How I can do this? My code is:
Clear["Global`*"]
yy = 10^-4;
rr = 0.999;
xx = 10^-15;
zz = 10^-4;
mm = 10^-4;
ic = -17.5
s = NDSolve[{D[y[t],
t] == (3 y[t])/5 - (12 m[t]^2 y[t])/5 + (2 r[t] y[t])/
5 - (6 x[t]^2 y[t])/5 + (3 y[t]^2)/5 + (7 y[t] z[t])/
5 - (y[t] z[t]^2)/10,
D[r[t], t] == -((2 r[t])/5) - (12 m[t]^2 r[t])/5 + (2 r[t]^2)/
5 - (6 r[t] x[t]^2)/5 + (3 r[t] y[t])/5 + (7 r[t] z[t])/
5 - (r[t] z[t]^2)/10,
D[x[t], t] == (9 x[t])/5 - (6 m[t]^2 x[t])/5 + (r[t] x[t])/
5 - (3 x[t]^3)/5 + (3 x[t] y[t])/10 + (x[t] z[t])/
5 - (x[t] z[t]^2)/20,
D[z[t], t] ==
12/5 + (12 m[t]^2)/5 - (12 r[t])/5 - (24 x[t]^2)/5 - (18 y[t])/
5 - (18 z[t])/5 - (6 m[t]^2 z[t])/5 + (r[t] z[t])/
5 - (3 x[t]^2 z[t])/5 + (3 y[t] z[t])/10 + (13 z[t]^2)/10 -
z[t]^3/20,
D[m[t], t] == -2 Sqrt[3] - (6 m[t])/5 -
2 Sqrt[3] m[t]^2 - (6 m[t]^3)/5 +
2 Sqrt[3] r[t] + (m[t] r[t])/5 +
2 Sqrt[3] x[t]^2 - (3 m[t] x[t]^2)/5 +
2 Sqrt[3] y[t] + (3 m[t] y[t])/10 +
2 Sqrt[3] z[t] + (6 m[t] z[t])/5 -
z[t]^2/(4 Sqrt[3]) - (m[t] z[t]^2)/20, x[ic] == xx, y[ic] == yy,
m[ic] == mm, z[ic] == zz, r[ic] == rr}, {x, y, z, m, r}, {t, ic,
10}]
I use the result to find
H = Table[
Exp[NIntegrate[z[t]/5 + (z[t]^2)/20 /.
First@s, {t, 0, i}]], {i, -17.5, 10, 0.2}]
Now I am going to compute:
NIntegrate[Exp[-t] x[t]^2 (H)^-1 , {t, 0, -7}]
but this does not work. In fact I dont know how to call H and x[t] together?
/. First@s
in your lastNIntegrate
? IsH
supposed to represent the interpolation of the table? $\endgroup$x[t]
and second how to gatherH
andx[t]
with the analytical functionExp[t]
. $\endgroup$H
, using/. First@s
does not work. In fact I tried different type of writing my purpose and I couldn`t get result. $\endgroup$H
then integrate the expression so that the result is a number. $\endgroup$