通过MATLAB求二阶全微分方程解析解.doc

上传人:工**** 文档编号:544234485 上传时间:2022-10-02 格式:DOC 页数:12 大小:836.01KB
返回 下载 相关 举报
通过MATLAB求二阶全微分方程解析解.doc_第1页
第1页 / 共12页
通过MATLAB求二阶全微分方程解析解.doc_第2页
第2页 / 共12页
通过MATLAB求二阶全微分方程解析解.doc_第3页
第3页 / 共12页
通过MATLAB求二阶全微分方程解析解.doc_第4页
第4页 / 共12页
通过MATLAB求二阶全微分方程解析解.doc_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《通过MATLAB求二阶全微分方程解析解.doc》由会员分享,可在线阅读,更多相关《通过MATLAB求二阶全微分方程解析解.doc(12页珍藏版)》请在金锄头文库上搜索。

1、1. 对于二阶全微分方程a ,不同的a,b,c取值会求出不同的解析解,解析解又是由齐次解和特解组成。其中,齐次解由特征方程决定,而特解的决定因素则比较复杂。2. 对于二阶全微分方程的分析,我们大致分为三种情况: b2-4ac0(两个不同的实根) b2-4ac=0(两个相同的重根) b2-4ac0的情况STEP1:求解析解s1=dsolve(D2y+3*Dy+2*y=0,y(0)=2,Dy(0)=0,t);s2=dsolve(D2y+3*Dy+2*y=sin(t),y(0)=2,Dy(0)=0,t);s3=dsolve(D2y+3*Dy+2*y=sin(2*t),y(0)=2,Dy(0)=0,t

2、);s4=dsolve(D2y+3*Dy+2*y=sin(5*t),y(0)=2,Dy(0)=0,t);s5=dsolve(D2y+3*Dy+2*y=sin(13*t),y(0)=2,Dy(0)=0,t);s6=dsolve(D2y+3*Dy+2*y=sin(25*t),y(0)=2,Dy(0)=0,t);STEP2:绘制图形(1)求w=1情况下的通解和齐次解t=1:0.1:10;s1=4*exp(-t)-2*exp(-2*t) %general solutions2=-3/10*cos(t)+1/10*sin(t)-11/5*exp(-2*t)+9/2*exp(-t) %special so

3、lutionsubplot(2,1,1);plot(t,s2);xlabel(t)ylabel(y(t)title(general solution )subplot(2,1,2);plot(t,s1);xlabel(t)ylabel(y(t)title(special solution) Figure1-1(2)求通解随w变化的规律.w在(0,1)之间的全微分方程通解clcclear alls1=dsolve(D2y+3*Dy+2*y=0,y(0)=2,Dy(0)=0,t);l2=dsolve(D2y+3*Dy+2*y=sin(0.05*t),y(0)=2,Dy(0)=0,t);l3=dso

4、lve(D2y+3*Dy+2*y=sin(0.15*t),y(0)=2,Dy(0)=0,t);l4=dsolve(D2y+3*Dy+2*y=sin(0.25*t),y(0)=2,Dy(0)=0,t);l5=dsolve(D2y+3*Dy+2*y=sin(0.5*t),y(0)=2,Dy(0)=0,t);l6=dsolve(D2y+3*Dy+2*y=sin(0.75*t),y(0)=2,Dy(0)=0,t);t=1:0.1:10;s1_n = eval(s1);l2_n = eval(l2);l3_n = eval(l3);l4_n = eval(l4);l5_n = eval(l5);l6_n

5、 = eval(l6);hold onplot(t,s1_n);plot(t,l2_n,m*);plot(t,l3_n,rx);plot(t,l4_n,g);plot(t,l5_n,bp);plot(t,l6_n,ko);hold off.w在(1,+)之间的全微分方程通解t=1:0.1:10;s1=-2*exp(-2*t)+4*exp(-t);s2=-3/10*cos(t)+1/10*sin(t)-11/5*exp(-2*t)+9/2*exp(-t);s3 =-3/20*cos(2*t)-1/20*sin(2*t)-9/4*exp(-2*t)+22/5*exp(-t);s4 =-15/754

6、*cos(5*t)-23/754*sin(5*t)-63/29*exp(-2*t)+109/26*exp(-t);s5=693/170*exp(-t)-39/29410*cos(13*t)-359/173*exp(-2*t)-167/29410*sin(13*t);s6=-1283/629*exp(-2*t)-75/393754*cos(25*t)+2529/626*exp(-t)-623/393754*sin(25*t);hold onplot(t,s1);plot(t,s2,m*);plot(t,s3,rx);plot(t,s4,g);plot(t,s5,bp);plot(t,s6,ko)

7、;hold off结论:在b2-4ac0的情况下,特解的形式是C1*sint+C2*cost,齐次解的形式是 C1*EXP(R1*t)+C2*EXP(R2*t).若w为正值且随w的增大,通解的形式趋近于齐次解。5.b2-4ac=0的情况STEP1:求解析解S1=dsolve(D2y+y=0,y(0)=2,Dy(0)=1,t)S2=dsolve(D2y+y=sin(t),y(0)=2,Dy(0)=1,t)s3=dsolve(D2y+y=sin(2*t),y(0)=2,Dy(0)=1,t)s4=dsolve(D2y+y=sin(6*t),y(0)=2,Dy(0)=1,t)s5=dsolve(D2y

8、+y=sin(10*t),y(0)=2,Dy(0)=1,t)s6=dsolve(D2y+y=sin(100*t),y(0)=2,Dy(0)=1,t)l0=dsolve(D2y+y=sin(0.05*t),y(0)=2,Dy(0)=1,t)l1=dsolve(D2y+y=sin(0.15*t),y(0)=2,Dy(0)=1,t)l2=dsolve(D2y+y=sin(0.25*t),y(0)=2,Dy(0)=1,t)l3=dsolve(D2y+y=sin(0.5*t),y(0)=2,Dy(0)=1,t)l4=dsolve(D2y+y=sin(0.75*t),y(0)=2,Dy(0)=1,t)ST

9、EP2:绘制图形(1) 求w=1情况下的通解和齐次解t=1:0.1:10;s1=2*exp(-2*t)+5*exp(-2*t).*t;s2=54/25*exp(-2*t)+26/5*exp(-2*t).*t-4/25*cos(t)+3/25*sin(t);subplot(2,1,1);plot(t,s1);xlabel(t)ylabel(y(t)title(homogenious solution)subplot(2,1,2);plot(t,s2);xlabel(t)ylabel(y(t)title(general solution )(2) (2)求通解随w变化的规律.w在(0,1)之间的全

10、微分方程通解t=1:0.1:10;s1=2*exp(-2*t)+5*exp(-2*t).*t;l2=5158402/2563201*exp(-2*t)+8025/1601*exp(-2*t).*t-32000/2563201*cos(1/20*t)+639600/2563201*sin(1/20*t);l3=5273762/2588881*exp(-2*t)+8105/1609*exp(-2*t).*t-96000/2588881*cos(3/20*t)+636400/2588881*sin(3/20*t);l4=8706/4225*exp(-2*t)+329/65*exp(-2*t).*t-

11、256/4225*cos(1/4*t)+1008/4225*sin(1/4*t);l5=610/289*exp(-2*t)+87/17*exp(-2*t).*t-32/289*cos(1/2*t)+60/289*sin(1/2*t);l6=11426/5329*exp(-2*t)+377/73*exp(-2*t).*t-768/5329*cos(3/4*t)+880/5329*sin(3/4*t);hold onplot(t,s1);plot(t,l2,m*);plot(t,l3,rx);plot(t,l4,g);plot(t,l5,bp);plot(t,l6,ko);hold off.w在(

12、1,+)之间的全微分方程通解t=1:0.1:10;s1=2*exp(-2*t)+5*exp(-2*t).*t;s2=54/25*exp(-2*t)+26/5*exp(-2*t).*t-4/25*cos(t)+3/25*sin(t);s3=3522/1681*exp(-2*t)+215/41*exp(-2*t).*t-160/1681*cos(5/2*t)-36/1681*sin(5/2*t);s4=350/169*exp(-2*t)+68/13*exp(-2*t).*t-12/169*cos(3*t)-5/169*sin(3*t);s5=1702/841*exp(-2*t)+150/29*ex

13、p(-2*t).*t-20/841*cos(5*t)-21/841*sin(5*t);s6=104942/52441*exp(-2*t)+1160/229*exp(-2*t).*t-60/52441*cos(15*t)-221/52441*sin(15*t);hold onplot(t,s1);plot(t,s2,m*);plot(t,s3,rx);plot(t,s4,g);plot(t,s5,bp);plot(t,s6,ko);hold off结论: W属于(0,1)时,随w的增大在齐次解的旁边波动;w属于(1,+),随w的增大逐渐趋近于齐次解。4. b2-4ac0s2=dsolve(D2y

14、+Dy+y=sin(t),y(0)=2,Dy(0)=1,t)s3=dsolve(D2y+Dy+y=sin(2*t),y(0)=2,Dy(0)=1,t)s4=dsolve(D2y+Dy+y=sin(2.5*t),y(0)=2,Dy(0)=1,t)s5=dsolve(D2y+Dy+y=sin(3*t),y(0)=2,Dy(0)=1,t)s6=dsolve(D2y+Dy+y=sin(3.5*t),y(0)=2,Dy(0)=1,t)s7=dsolve(D2y+Dy+y=sin(5*t),y(0)=2,Dy(0)=1,t).w在(0,1)之间的全微分方程通解.w在(1,+)之间的全微分方程通解2.b0.w在(0,1)之间的全微分方程通解.w在(1,+)之间的全微分方程通解2.b=0STEP1:求解

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 社会民生

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号