公告:1)网站程序升级:Q2A升级到1.8.6,Wordpress升级到5.7.2
2)修复了头像加载慢与提交问题反应慢等问题
2021-06-16

欢迎来到 Mathematica 问答社区

提问时请贴上文本代码

语法高亮:在编辑器中点击

被禁止的话题:广告破解

请阅读:《提问的智慧》

备用域名:mma.ooo

支持LaTex数学公式
行内公式标识符:\$ 或“$\backslash ($”+“$\backslash )$”,
行间公式标识符:\$\$ 或 “$\backslash [$”+“$\backslash ]$”

社区建议QQ群:365716997

分类

+2 投票
1.4k 浏览
v11[x_, \[Delta]_, p1_, b11_] := -2 - b11 + (-1 + x)/x + 2 b11 x + 
  2 x^2 - b11 x^4 - 1/3 p1*\[Delta] (-1 + x^3) - (
  1 - 1/(x^3 (1 + \[Delta])^3 - \[Delta] (3 + \[Delta] (3 + \
\[Delta])))^(1/3))/(1 + \[Delta])^3 - (
  2 b11 (-1 + (x^3 (1 + \[Delta])^3 - \[Delta] (3 + \[Delta] (3 + \
\[Delta])))^(1/3)))/(1 + \[Delta])^3 - (
  2 (-1 + (x^3 (1 + \[Delta])^3 - \[Delta] (3 + \[Delta] (3 + \
\[Delta])))^(2/3)))/(1 + \[Delta])^3 + (
  b11 (-1 + (x^3 (1 + \[Delta])^3 - \[Delta] (3 + \[Delta] (3 + \
\[Delta])))^(4/3)))/(1 + \[Delta])^3
F[x_, \[Delta]_] := ((1/((1 + \[Delta])^3*x^3) - x^(-3) + 1)^(-1/3) - 
    1) x
plist = Range[2.5, 3, 0.01];
Tlist = Table[sol = NSolve[v11[x, 0.01, p, 0.1] == 0 && x > 0, x];
  xa = x /. sol[[-1]];
  xb = x /. sol[[-2]];
  2*NIntegrate[(-1/2 x^2*F[x, 0.01]/v11[x, 0.01, p, 0.1])^(1/2), {x, 
     xa, xb}], {p, plist}]

运行结果

{2.50447, 2.53123, 2.55932, 2.58889, 2.62006, 2.65303, 2.688, 2.7252, \
2.76494, 2.80755, 2.85346, 2.90318, 2.95738, 3.01689, 3.0828, \
3.15656, 3.2402, 3.33662, 3.45019 + 5.34044*10^-7 I, 
 3.588 + 1.39994*10^-6 I, 3.76257 + 0.0000103213 I, 3.99962, 
 4.36644 + 4.58063*10^-6 I, 5.18809, 
 11.6708 + 0.00676701 I, 10.0829, 9.32563, 8.81796, 8.43657, 
 8.13567 + 0.000708948 I, 7.87621, 7.65394, 7.46839, 
 7.3056 + 0.015269 I, 7.1488, 7.01832, 6.89796 + 0.0106327 I, 6.77468,
  6.67698 + 0.00628891 I, 6.57456 + 0.00942845 I, 
 6.48188 + 0.0125146 I, 6.3876, 6.31884 + 0.0164423 I, 6.22926, 
 6.16198 + 0.0274216 I, 6.09393 + 0.0154801 I, 6.00774, 
 5.96437 + 0.0307611 I, 5.88839 + 6.77018*10^-7 I, 
 5.85019 + 0.00723323 I, 5.79512 + 0.00635796 I}

并有一系列错误提示。

分类:其它 | 用户: keanhy (361 分)

2 个回答

0 投票
(-1/2 x^2*F[x, 0.01]/v11[x, 0.01, 2.5, 0.1])^(1/2)

Sqrt[-(((-1 + 1/(1 - 0.0294099/x^3)^(1/3)) x^3)/(-0.0240175 - 1/x + 
  0.2 x + 2 x^2 - 0.1 x^4 + 0.97059/(-0.030301 + 1.0303 x^3)^(1/3) - 
  0.197059 (-0.030301 + 1.0303 x^3)^(1/3) - 
  1.94118 (-0.030301 + 1.0303 x^3)^(2/3) + 
  x^3 (-0.00833333 + 0.1 (-0.030301 + 1.0303 x^3)^(1/3))))]/Sqrt[2]
  
  

你可以看看你的函数图像和你的积分区间,然后对照计算中显示的提示寻找一下问题。

用户: 落雨流觞 (1.0k 分)
我通过修改一些参数,让结果中不出现虚数,但是不太明白什么原因
0 投票

我把一些小数表示的实数用分数表示,然后加大了工作精度WorkingPrecision、设定最小递推数MinRecursion,结果就没有虚数了,虽然不太了解其中的道道...

v11[x_, \[Delta]_, p1_, b11_] := -2 - b11 + (-1 + x)/x + 2 b11 x + 
  2 x^2 - b11 x^4 - 1/3 p1*\[Delta] (-1 + x^3) - (
  1 - 1/(x^3 (1 + \[Delta])^3 - \[Delta] (3 + \[Delta] (3 + \
\[Delta])))^(1/3))/(1 + \[Delta])^3 - (
  2 b11 (-1 + (x^3 (1 + \[Delta])^3 - \[Delta] (3 + \[Delta] (3 + \
\[Delta])))^(1/3)))/(1 + \[Delta])^3 - (
  2 (-1 + (x^3 (1 + \[Delta])^3 - \[Delta] (3 + \[Delta] (3 + \
\[Delta])))^(2/3)))/(1 + \[Delta])^3 + (
  b11 (-1 + (x^3 (1 + \[Delta])^3 - \[Delta] (3 + \[Delta] (3 + \
\[Delta])))^(4/3)))/(1 + \[Delta])^3
F[x_, \[Delta]_] := ((1/((1 + \[Delta])^3*x^3) - x^(-3) + 1)^(-1/3) - 
    1) x
plist = Range[5/2, 3, 1/100];
Tpoint = Table[{sol = 
    NSolve[v11[x, 1/100, p, 1/10] == 0 && x > 0, x, 
     WorkingPrecision -> 30];
   xa = x /. sol[[-1]];
   xb = x /. sol[[-2]];
   p // N,
   T = 2*NIntegrate[(-1/2 x^2*F[x, 0.01]/v11[x, 0.01, p, 0.1])^(1/
         2), {x, xa, xb}, MinRecursion -> 5]}, {p, plist}]

结果如下

{{2.5, 2.50447}, {2.51, 2.53123}, {2.52, 2.55932}, {2.53, 
  2.58888}, {2.54, 2.62006}, {2.55, 2.65303}, {2.56, 2.688}, {2.57, 
  2.7252}, {2.58, 2.76494}, {2.59, 2.80755}, {2.6, 2.85345}, {2.61, 
  2.90318}, {2.62, 2.95738}, {2.63, 3.01689}, {2.64, 3.0828}, {2.65, 
  3.15656}, {2.66, 3.2402}, {2.67, 3.33662}, {2.68, 3.45019}, {2.69, 
  3.58799}, {2.7, 3.76258}, {2.71, 3.99961}, {2.72, 4.36644}, {2.73, 
  5.1881}, {2.74, 11.6725}, {2.75, 10.0877}, {2.76, 9.32684}, {2.77, 
  8.82028}, {2.78, 8.44005}, {2.79, 8.13582}, {2.8, 7.88246}, {2.81, 
  7.66561}, {2.82, 7.47624}, {2.83, 7.30832}, {2.84, 7.1576}, {2.85, 
  7.021}, {2.86, 6.89617}, {2.87, 6.78132}, {2.88, 6.67503}, {2.89, 
  6.57617}, {2.9, 6.48381}, {2.91, 6.39719}, {2.92, 6.31566}, {2.93, 
  6.23869}, {2.94, 6.16583}, {2.95, 6.09667}, {2.96, 6.03088}, {2.97, 
  5.96816}, {2.98, 5.90825}, {2.99, 5.85093}, {3., 5.796}}

不再有虚数了,希望有人能给出解释

用户: keanhy (361 分)
这上面含有虚数的复数有些能出来数值解,也还能和实数比较,我还没想清楚他的原理
...