教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 建筑文档 >

第四章 方程求解(4)

来源:网络收集 时间:2026-01-17
导读: > deqn:=simplify(collect(ODE,e),{e^(e_order+1)=0}):> for i from 0 to e_order do ode[i]:=coeff(lhs(deqn),e,i)=0 od: > ode[0]; = + y0????????????2τ2y00 > ode[1]; > ode[2]; > dsolve({ode[0],eta[0](0)=0

> deqn:=simplify(collect(ODE,e),{e^(e_order+1)=0}):> for i from 0 to e_order do ode[i]:=coeff(lhs(deqn),e,i)=0 od:

> ode[0];

= + y0????????????2τ2y00

> ode[1]; > ode[2];

> dsolve({ode[0],eta[0](0)=0,D(eta[0])(0)=C[1]},eta[0](t)); > eta[0]:=unapply(rhs(%),t); > ode[1];

> map(combine,ode[1],'trig');

> ode[1]:=map(collect,%,[sin(t),cos(t)]);

> dsolve({ode[1],eta[1](0)=0,D(eta[1])(0)=C[2]},eta[1](t),method=laplace); > map(collect,%,[sin(t),cos(t),t]);

= y1 + ? ????????? + + 18C1() ? C12() + C12τw1C1C2()sinτ???????? ? 132C13C1τw1()cosτ132C13()cos3τ

> solve({coeff(lhs(ode[1]),sin(t))=0,coeff(lhs(ode[1]),cos(t))=0});

,,{}, = C10 = w1w1{}, = C12 = w10{}, = C1-2 = w10

> w[1]:=0:C[1]:=-2: > ode[1];

= + + ????????????2τ2y1y12()cos3τ0

> dsolve({ode[1],eta[1](0)=0,D(eta[1])(0)=C[2]},eta[1](t),method=laplace); > eta[1]:=unapply(rhs(%),tau); > map(combine,ode[2],'trig'):

> ode[2]:=map(collect,%,[sin(t),sin(3*t),cos(t),cos(3*t)]);

> solve({coeff(lhs(ode[2]),sin(t))=0,coeff(lhs(ode[2]),cos(t))=0}); > assign(%):

> dsolve({ode[2],eta[2](0)=0,D(eta[2])(0)=C[3]},eta[2](t),method=laplace): > eta[2]:=unapply(rhs(%),t); > for i from 0 to e_order do map(combine,ode[i],'trig'):

ode[i]:=map(collect,%,[seq(sin((2*j+1)*t),j=0..i),seq(cos((2*j+1)*t),j=0..i)]): solve({coeff(lhs(ode[i]),sin(t))=0,coeff(lhs(ode[i]),cos(t))=0}): assign(%):

dsolve({ode[i],eta[i](0)=0,D(eta[i])(0)=C[i+1]},eta[i](t),method=laplace): collect(%,[seq(sin((2*j+1)*t),j=0..i),seq(cos((2*j+1)*t),j=0..i)]): eta[i]:=unapply(rhs(%),t); od:

> omega;

? + + 1116ε2173072ε435884736ε6> y(t):

> y:=unapply(simplify(y(t),{e^e_order=0}),t): > e:=1:y(t);

> plot(y(t),t=0..15);

在该问题的求解过程中, 前半部分我们按照交互式命令方式输入, 也就是把

数学逻辑推理的过程“翻译”成Maple函数, 而在后半部分, 则采用程序设计方式书写了数学推导过程, 这是应用Maple解决实际问题的两种方式. 前一种方法只需了解Maple函数即可应用, 而后一种程序设计方式则需掌握Maple程序设计语言. 但是, 不论是那一种方式, 数学基础总是最重要的. 3 偏微分方程求解初步

Maple中偏微分方程求解器为pdsolve, 该函数及其它偏微分方程求解工具存于软件包PDEtools中. 函数pdsolve能够很快的辨认出偏微分方程是否为可以用标准方法求解的类型, 如果无法判别, 则pdsolve采用一种启发式的算法尝试偏微分方程按特征结构分离出来. pdsolve的策略就是寻找给定偏微分方程的通解, 如不能成功则寻找可以完全分离的变量, 因此, 该函数返回的结果可能为:

(i) 通解;

(ii) 近似的通解(即包含任意函数但又不足以得到通解的解); (iii) 变量分离的非耦合的常微分方程.

如不能完全分离变量, 则函数再次调用自身, 如仍失败则返回未完全分离的变量并给出一个警告信息. 其命令格式为:

pdsolve(PDE, f);

其中, PDE为偏微分方程, f为被求解函数.

下面通过几个例子说明pdsolve的用法: > PDE1:=diff(u(x,t),[t$2])-1/v^2*diff(u(x,t),[x$2]); > pdsolve(PDE1,u(x,t));

= ()u,xt + ()_F1? ? tvx()_F2 ? tvx

> restart:

> PDE2:=a*x*diff(u(x,t),x)+b*t*diff(u(x,t),t)=0;

:= PDE2 = + ax??????????x()u,xtbt??????????t()u,xt0

> pdsolve(PDE2,u(x,t));

= ()u,xt??????????????_F1tx????????ba

> PDE3:=diff(u(x,t),x$2)-t^2*diff(u(x,t),t$2)-t*diff(u(x,t),t)=0; > pdsolve(PDE3,u(x,t)); > restart:

> heatPDE:=diff(u(x,t),t)=diff(u(x,t),[x$2]); > pdsolve(heatPDE,u(x,t));

> dsolve(diff(F2(t),t)=c[1]*F2(t),F2(t));

= ()F2t_C1e()c1t

> dsolve(diff(F1(x),[x$2])=c[1]*F1(x));

= ()F1x + _C1e()c1x_C2e()?c1x

> result:=rhs(%)*rhs(%%);

:= result() + _C1e()c1x_C2e()?c1x_C1e()c1t>

subs(u(x,t)=result,heatPDE):expand(%); + _C12c1e()c1te()c1x_C1c1e()c1t_C2e()c1x = + _C12c1e()c1te()c1x_C1c1e()c1t_C2e()c1x

> lhs(%)-rhs(%);

…… 此处隐藏:1108字,全部文档内容请下载后查看。喜欢就下载吧 ……
第四章 方程求解(4).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/438616.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)