我在想换元积分,两个积分分别是:
NIntegrate[{(*换积分元*)
g[z, rm] D[
z, {r, 1}]},(*积分上下限z=0\[Rule]r=rm,z=1\[Rule]r=\[Infinity]*){r,
rm, \[Infinity]}]
和
NIntegrate[{(*换积分元*)
g[z, rm]},(*积分上下限z=0\[Rule]r=rm,z=1\[Rule]r=\[Infinity]*){z, 0, 1}]
其中z = 1 - rm/r;
两个积分结果在a = 0时相同,但是趋势却完全不一样,求解答,以下是全部代码:
ClearAll[ff, r, M, A, B, c, ddc, ddA, dc, \[Alpha], rm, g, z, r0, h, \
p, q, a, b, br, bd, d, um, R, hh, RR1, RR, rr1, rr, ff, dff, L]
Clear[Subscript]
Clear["Global`*"]
\[Theta] = \[Pi]/2;
M = 1/2;
\[Rho] = r^2 + a^2 Cos[\[Theta]]^2;
delta = r^2 - 2 m[r] r + a^2;
m[r_] = M;(*test*)
A[r_] = 1 - (2 m[r] r)/\[Rho];
B[r_] = \[Rho]/delta;
c[r_] = (((r^2 + a^2)^2 -
delta a^2 Sin[\[Theta]]^2) Sin [\[Theta]]^2 )/\[Rho]; // \
FullSimplify
ff[r_] = (4 a m[r] r Sin[\[Theta]]^2)/\[Rho];
dA[r_] = D[A[r], {r, 1}];
ddA[r_] = D[A[r], {r, 2}];
dc[r_] = D[c[r], {r, 1}];
ddc[r_] = D[c[r], {r, 2}];
dff[r_] = D[ff[r], {r, 1}];
ddff[r_] = D[ff[r], {r, 2}];
uu[r0_] = (-ff[r0] + \[Sqrt](4 A[r0] c[r0] + ff[r0]^2))/(2 A[r0]);
ddu[r0_] = D[uu[r0], {r0, 2}];
u[r_] = A[r0] dc[r0] - dA[r0] c[r0] + dA[r0] ff[r0] uu[r0] -
A[r0] dff[r0] uu[r0];
rm = Solve[{A[r0] dc[r0] - dA[r0] c[r0] + dA[r0] ff[r0] uu[r0] -
A[r0] dff[r0] uu[r0] == 0}, r0][[3, 1, 2]]
(*z = 1-rm/r;*)
r = -(rm/(-1 + z));(*换元积分*)
(*Plot[rm=FindRoot[{A[r0]dc[r0]-dA[r0]c[r0]+dA[r0]ff[r0] \
uu[r0]-A[r0]dff[r0] uu[r0]\[Equal]0},{r0,1.2}][[1,2]],{a,0,0.5}]*)
R[z_, r0_] = (((2 (1 - A[r0]))/dA[r]) (ff[r] +
2 A[r] uu[r0]) \[Sqrt](B[r] Abs[A[r0]]))/(\[Sqrt](4 A[
r] c[r]^2 + c[r] ff[r]^2));
hh[z_, r0_] =
1/(\[Sqrt](A[r0] - A[r] c[r0]/c[r] +
uu[r0]/c[r] (A[r] ff[r0] - A[r0] ff[r])));
h[z_, r0_] = 1/(\[Sqrt](p[r0, z] z + q[r0, z] z^2));(*f0,即原式展开到二阶*)
p[r0_, z_] =(*Sign[A[r0]]*)(((1 - A[r0]) u[r0]))/(c[r0] dA[r0]);
q[r0_, z_] =(*Sign[A[
r0]]*)((1 - A[r0])^2/(2 c[r0]^2 dA[r0]^3)) (2 c[r0] dc[
r0] dA[r0]^2 + (c[r0] ddc[r0] - 2 dc[r0]^2) A[r0] dA[r0] -
c[r0] dc[r0] A[r0] ddA[r0] +
uu[r0] (A[r0] c[r0] (ddA[r0] dff[r0] - dA[r0] ddff[r0]) +
2 dA[r0] dc[r0] (A[r0] dff[r0] - dA[r0] ff[r0])));
g[z_, rm_] = R[z, rm] hh[z, rm] - R[0, rm] h[z, rm];
aa = R[0, rm]/(2 Sqrt[q[rm, 0]]) /. {r -> rm};
um = (-ff[rm] + Sqrt[4 A[rm] c[rm] + ff[rm]^2])/(2 A[rm]);
Plot[{br[r_] = -\[Pi] + 2 aa Log[(2 (1 - A[rm]))/(dA[rm] rm)] +
aa Log[(ddu[rm] rm^2)/(2 um)](*aa Log[(4q[rm,0]c[rm])/(um Abs[A[
rm]](ff[rm]+2um A[rm]))]*)+ NIntegrate[{(*换积分元*)
g[z, rm]},(*积分上下限z=0\[Rule]r=rm,z=
1\[Rule]r=\[Infinity]*){z, 0, 1}](**)}, {a, 0, 0.3}]
NIntegrate[{(*换积分元*)
g[z, rm] D[
z, {r, 1}]},(*积分上下限z=0\[Rule]r=rm,z=1\[Rule]r=\[Infinity]*){r,
rm, \[Infinity]}]
和
NIntegrate[{(*换积分元*)
g[z, rm]},(*积分上下限z=0\[Rule]r=rm,z=1\[Rule]r=\[Infinity]*){z, 0, 1}]
其中z = 1 - rm/r;
两个积分结果在a = 0时相同,但是趋势却完全不一样,求解答,以下是全部代码:
ClearAll[ff, r, M, A, B, c, ddc, ddA, dc, \[Alpha], rm, g, z, r0, h, \
p, q, a, b, br, bd, d, um, R, hh, RR1, RR, rr1, rr, ff, dff, L]
Clear[Subscript]
Clear["Global`*"]
\[Theta] = \[Pi]/2;
M = 1/2;
\[Rho] = r^2 + a^2 Cos[\[Theta]]^2;
delta = r^2 - 2 m[r] r + a^2;
m[r_] = M;(*test*)
A[r_] = 1 - (2 m[r] r)/\[Rho];
B[r_] = \[Rho]/delta;
c[r_] = (((r^2 + a^2)^2 -
delta a^2 Sin[\[Theta]]^2) Sin [\[Theta]]^2 )/\[Rho]; // \
FullSimplify
ff[r_] = (4 a m[r] r Sin[\[Theta]]^2)/\[Rho];
dA[r_] = D[A[r], {r, 1}];
ddA[r_] = D[A[r], {r, 2}];
dc[r_] = D[c[r], {r, 1}];
ddc[r_] = D[c[r], {r, 2}];
dff[r_] = D[ff[r], {r, 1}];
ddff[r_] = D[ff[r], {r, 2}];
uu[r0_] = (-ff[r0] + \[Sqrt](4 A[r0] c[r0] + ff[r0]^2))/(2 A[r0]);
ddu[r0_] = D[uu[r0], {r0, 2}];
u[r_] = A[r0] dc[r0] - dA[r0] c[r0] + dA[r0] ff[r0] uu[r0] -
A[r0] dff[r0] uu[r0];
rm = Solve[{A[r0] dc[r0] - dA[r0] c[r0] + dA[r0] ff[r0] uu[r0] -
A[r0] dff[r0] uu[r0] == 0}, r0][[3, 1, 2]]
(*z = 1-rm/r;*)
r = -(rm/(-1 + z));(*换元积分*)
(*Plot[rm=FindRoot[{A[r0]dc[r0]-dA[r0]c[r0]+dA[r0]ff[r0] \
uu[r0]-A[r0]dff[r0] uu[r0]\[Equal]0},{r0,1.2}][[1,2]],{a,0,0.5}]*)
R[z_, r0_] = (((2 (1 - A[r0]))/dA[r]) (ff[r] +
2 A[r] uu[r0]) \[Sqrt](B[r] Abs[A[r0]]))/(\[Sqrt](4 A[
r] c[r]^2 + c[r] ff[r]^2));
hh[z_, r0_] =
1/(\[Sqrt](A[r0] - A[r] c[r0]/c[r] +
uu[r0]/c[r] (A[r] ff[r0] - A[r0] ff[r])));
h[z_, r0_] = 1/(\[Sqrt](p[r0, z] z + q[r0, z] z^2));(*f0,即原式展开到二阶*)
p[r0_, z_] =(*Sign[A[r0]]*)(((1 - A[r0]) u[r0]))/(c[r0] dA[r0]);
q[r0_, z_] =(*Sign[A[
r0]]*)((1 - A[r0])^2/(2 c[r0]^2 dA[r0]^3)) (2 c[r0] dc[
r0] dA[r0]^2 + (c[r0] ddc[r0] - 2 dc[r0]^2) A[r0] dA[r0] -
c[r0] dc[r0] A[r0] ddA[r0] +
uu[r0] (A[r0] c[r0] (ddA[r0] dff[r0] - dA[r0] ddff[r0]) +
2 dA[r0] dc[r0] (A[r0] dff[r0] - dA[r0] ff[r0])));
g[z_, rm_] = R[z, rm] hh[z, rm] - R[0, rm] h[z, rm];
aa = R[0, rm]/(2 Sqrt[q[rm, 0]]) /. {r -> rm};
um = (-ff[rm] + Sqrt[4 A[rm] c[rm] + ff[rm]^2])/(2 A[rm]);
Plot[{br[r_] = -\[Pi] + 2 aa Log[(2 (1 - A[rm]))/(dA[rm] rm)] +
aa Log[(ddu[rm] rm^2)/(2 um)](*aa Log[(4q[rm,0]c[rm])/(um Abs[A[
rm]](ff[rm]+2um A[rm]))]*)+ NIntegrate[{(*换积分元*)
g[z, rm]},(*积分上下限z=0\[Rule]r=rm,z=
1\[Rule]r=\[Infinity]*){z, 0, 1}](**)}, {a, 0, 0.3}]