一类四阶非线性微分方程的稳定解

2024-09-29 03:36:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经在python中使用bvp解算器解决了以下bvp问题

d4y/dx4= 0.00033*V/(0.000001-y)^(2) , y(0)=y'(0)=y(1)=y'(1)=0 在上述等式中,“V”是一个参数,该参数已使用for循环进行了更改。有趣的是,上述微分方程的解对于V>;好的。bvp解算器仍然会为V>;生成一些错误的值;好的。如何使解算器在出现这种不稳定性时立即停止计算


Tags: gtfor参数错误算器bvp等式d4y
1条回答
网友
1楼 · 发布于 2024-09-29 03:36:20

对于标准化方程(改变了yV的标度)

    y''''*(1e-6-y)**2 = 3.3e-4*V
    (1e6*y)''''*(1-1e6*y)**2 = 3.3e14*V

    u = 1e6*y,   c = 3.3e14*V

    u'''' = c/(1-u)**2

我得到了c=70.099305的一个临界值,即V0=0.2124e-12。对于非常小的c,解决方案同样小,接近y(t)=c/24*(t*(1-t))**2。对于接近临界值的c,网格细化集中在接近y=0.4的最大值

c=70.099305

def f(t,u): return [u[1],u[2],u[3],c/(1-u[0])**2]
def bc(u0,u1): return [u0[0], u0[1], u1[0], u1[1]]

t = np.linspace(0,1,5);
u = np.zeros([4,len(t)])
res = solve_bvp(f,bc,t,u, tol=1e-4, max_nodes=5000)
print(res.message)

%matplotlib inline
if res.success:
    plt.figure(figsize=(10,5))
    t = np.linspace(0,1,502)
    plt.plot(t, c/24*(t*(1-t))**2,c='y', lw=3)
    plt.plot(t,res.sol(t)[0],'b')
    plt.plot(res.x,res.y[0],'xr')
    plt.grid(); plt.show()

plot of solution and small parameter approximation

蓝色-数值解,黄色-小c

相关问题 更多 >