高分求解!现在要求一组微分方程组

来源:百度知道 编辑:UC知道 时间:2024/09/23 06:03:44
高分求解!现在要求一组微分方程组,方程组是:i*x1'[t]==a*sin[w*t]*x2[t]+b*x1[t],i*x2'[t]==a*sin[w*t]*x1[t]+c*x2[t],x1[0]==d,x2[0]==0.现高分求助mathematica高手及matalab高手!请教求解程序!如果没有解析解,用数值解进行模拟也可!女友论文急用,急!急!急!
用matalab运行这个程序的过程如下:
r=dsolve('Dx(t)=a*sin(w*t)*y(t)+b*x(t),Dy=a*sin(w*t)*x(t)+c*y(t)','x(0)=d,y(0)=0','t')
Warning: Explicit solution could not be found.
求问高手怎样才能解出这个方程?

因为你的参数太多,大概只能用数值解。
Mathematica方法直接调用:
solu = Block[{d = 0.1, a = 2, w = 0.1, c = 1, b = 2},
NDSolve[{D[x1[t], t] == a Sin[w t] x2[t] + b x1[t],
D[x2[t], t] == a Sin[w t] x1[t] + c x2[t], x1[0] == d,
x2[0] == 0}, {x1, x2}, {t, 0, 4}]]
Plot[Evaluate[{x1[t], x2[t]} /. solu[[1]]], {t, 0, 4},
AxesLabel -> {"Time", "x1, x2"}]
或者自己写的:
f[{x1_, x2_, t_}] := {x1 + t0/n (a Sin[w t] x2 + b x1),
x2 + t0/n (a Sin[w t] x1 + c x2), t + t0/n}
x1x2t = Block[{d = 0.1, a = 2, w = 0.1, c = 1, t0 = 4, b = 2,
n = 100}, h = t/n;
NestList[f, {d, 0, 0}, n]];(*List of {x1,x2,t}*)
ListPlot[{x1x2t[[All, {3, 1}]], x1x2t[[All, {3, 2}]]},
AxesLabel -> {"Time", "x1, x2"}]
得到结果图:
http://hi.baidu.com/csgraph/album/item/b2d830b72ff902d031add1bf.h