Matlab 画图,微分方程组(急)帮忙编写下函数文件和主程序,微分方程组如下:dy1/dt=y2;dy2/dt=2*w*y4sinr-k*y2;dy3/dt=y4;dy4/dt=-2*w*(y6*cosr+y2*sinr)-k*y4;dy5/dt=y6;dy6/dt=2*w*y4*cosr-k*y6-g;参数可以随便设

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 05:46:24
Matlab画图,微分方程组(急)帮忙编写下函数文件和主程序,微分方程组如下:dy1/dt=y2;dy2/dt=2*w*y4sinr-k*y2;dy3/dt=y4;dy4/dt=-2*w*(y6*co

Matlab 画图,微分方程组(急)帮忙编写下函数文件和主程序,微分方程组如下:dy1/dt=y2;dy2/dt=2*w*y4sinr-k*y2;dy3/dt=y4;dy4/dt=-2*w*(y6*cosr+y2*sinr)-k*y4;dy5/dt=y6;dy6/dt=2*w*y4*cosr-k*y6-g;参数可以随便设
Matlab 画图,微分方程组(急)
帮忙编写下函数文件和主程序,微分方程组如下:
dy1/dt=y2;
dy2/dt=2*w*y4sinr-k*y2;
dy3/dt=y4;
dy4/dt=-2*w*(y6*cosr+y2*sinr)-k*y4;
dy5/dt=y6;
dy6/dt=2*w*y4*cosr-k*y6-g;
参数可以随便设

Matlab 画图,微分方程组(急)帮忙编写下函数文件和主程序,微分方程组如下:dy1/dt=y2;dy2/dt=2*w*y4sinr-k*y2;dy3/dt=y4;dy4/dt=-2*w*(y6*cosr+y2*sinr)-k*y4;dy5/dt=y6;dy6/dt=2*w*y4*cosr-k*y6-g;参数可以随便设
>>syms y1 y2 y3 y4 y5 y6
>>syms t w k r g
>>S=dsolve('Dy1=y2','Dy2=2*w*y4*sin(r)-k*y2','Dy3=y4','Dy4=-2*w*(y6*cos(r)+y2*sin(r))-k*y4','Dy5=y6','Dy6=2*w*y4*cos(r)-k*y6-g')
S =
y2: [1x1 sym]
y1: [1x1 sym]
y3: [1x1 sym]
y4: [1x1 sym]
y5: [1x1 sym]
y6: [1x1 sym]
>> S.y1

ans =

(C1*k^3*cos(r)*sin(r))/(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3) - (C6*k^2*sin(r)^2)/(exp(k*t + 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3)) - (C5*k^2*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - k*t)*sin(r)^2)/(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3) + (C4*k^2*cos(r)^2)/(exp(k*t)*(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3)) + (4*C4*w^2*cos(r)^4)/(exp(k*t)*(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3)) + (g*k^2*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^2)/(4*(k^4*cos(r)*sin(r) + 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 + 8*i*k*w^3*cos(r)^3*sin(r) + 8*i*k*w^3*cos(r)*sin(r)^3)) + (g*k^2*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^2)/(4*(k^4*cos(r)*sin(r) - 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 - 8*i*k*w^3*cos(r)^3*sin(r) - 8*i*k*w^3*cos(r)*sin(r)^3)) - (g*k^2*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^4)/(4*(k^4*cos(r)*sin(r) + 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 + 8*i*k*w^3*cos(r)^3*sin(r) + 8*i*k*w^3*cos(r)*sin(r)^3)) - (g*k^2*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^4)/(4*(k^4*cos(r)*sin(r) - 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 - 8*i*k*w^3*cos(r)^3*sin(r) - 8*i*k*w^3*cos(r)*sin(r)^3)) - (g*k*cos(r)^2*sin(r)^2)/(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3) - (4*g*w^2*cos(r)^2*sin(r)^4)/(k^4*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3) - (4*g*w^2*cos(r)^4*sin(r)^2)/(k^4*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3) + (4*C1*k*w^2*cos(r)*sin(r)^3)/(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3) + (4*C1*k*w^2*cos(r)^3*sin(r))/(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3) + (g*k^2*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)^2*sin(r)^2)/(4*(k^4*cos(r)*sin(r) + 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 + 8*i*k*w^3*cos(r)^3*sin(r) + 8*i*k*w^3*cos(r)*sin(r)^3)) + (g*k^2*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)^2*sin(r)^2)/(4*(k^4*cos(r)*sin(r) - 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 - 8*i*k*w^3*cos(r)^3*sin(r) - 8*i*k*w^3*cos(r)*sin(r)^3)) + (4*C4*w^2*cos(r)^2*sin(r)^2)/(exp(k*t)*(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3)) - (2*C5*k*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - k*t)*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3) + (2*C6*k*w*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(exp(k*t + 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*(k^3*cos(r)*sin(r) + 4*k*w^2*cos(r)^3*sin(r) + 4*k*w^2*cos(r)*sin(r)^3)) + (16*g*k*t*w^4*cos(r)^2*sin(r)^4)/(k^6*cos(r)*sin(r) + 8*k^4*w^2*cos(r)^3*sin(r) + 8*k^4*w^2*cos(r)*sin(r)^3 + 16*k^2*w^4*cos(r)^5*sin(r) + 32*k^2*w^4*cos(r)^3*sin(r)^3 + 16*k^2*w^4*cos(r)*sin(r)^5) + (16*g*k*t*w^4*cos(r)^4*sin(r)^2)/(k^6*cos(r)*sin(r) + 8*k^4*w^2*cos(r)^3*sin(r) + 8*k^4*w^2*cos(r)*sin(r)^3 + 16*k^2*w^4*cos(r)^5*sin(r) + 32*k^2*w^4*cos(r)^3*sin(r)^3 + 16*k^2*w^4*cos(r)*sin(r)^5) - (g*k*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4*cos(r)*sin(r) + 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 + 8*i*k*w^3*cos(r)^3*sin(r) + 8*i*k*w^3*cos(r)*sin(r)^3)) + (g*k*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4*cos(r)*sin(r) - 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 - 8*i*k*w^3*cos(r)^3*sin(r) - 8*i*k*w^3*cos(r)*sin(r)^3)) + (g*k*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^4*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4*cos(r)*sin(r) + 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 + 8*i*k*w^3*cos(r)^3*sin(r) + 8*i*k*w^3*cos(r)*sin(r)^3)) - (g*k*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^4*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4*cos(r)*sin(r) - 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 - 8*i*k*w^3*cos(r)^3*sin(r) - 8*i*k*w^3*cos(r)*sin(r)^3)) + (4*g*k^3*t*w^2*cos(r)^2*sin(r)^2)/(k^6*cos(r)*sin(r) + 8*k^4*w^2*cos(r)^3*sin(r) + 8*k^4*w^2*cos(r)*sin(r)^3 + 16*k^2*w^4*cos(r)^5*sin(r) + 32*k^2*w^4*cos(r)^3*sin(r)^3 + 16*k^2*w^4*cos(r)*sin(r)^5) - (g*k*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)^2*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4*cos(r)*sin(r) + 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 + 8*i*k*w^3*cos(r)^3*sin(r) + 8*i*k*w^3*cos(r)*sin(r)^3)) + (g*k*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)^2*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4*cos(r)*sin(r) - 2*i*k^3*w*cos(r)*sin(r) + 4*k^2*w^2*cos(r)^3*sin(r) + 4*k^2*w^2*cos(r)*sin(r)^3 - 8*i*k*w^3*cos(r)^3*sin(r) - 8*i*k*w^3*cos(r)*sin(r)^3))
>> S.y2

ans =

(C5*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - k*t)*sin(r))/cos(r) + (C6*sin(r))/(exp(k*t + 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)) + (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^3)/(4*(k*cos(r) + 2*i*w*cos(r))) + (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^3)/(4*(k*cos(r) - 2*i*w*cos(r))) + (g*cos(r)*sin(r))/k - (C4*cos(r))/(exp(k*t)*sin(r)) - (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r))/(4*(k*cos(r) + 2*i*w*cos(r))) - (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r))/(4*(k*cos(r) - 2*i*w*cos(r))) - (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)*sin(r))/(4*(k + 2*i*w)) - (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)*sin(r))/(4*(k - 2*i*w))
>> S.y3

ans =

(4*C2*w^2*cos(r)^3)/(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2) + (C2*k^2*cos(r))/(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2) + (4*C2*w^2*cos(r)*sin(r)^2)/(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2) + (2*C5*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - k*t)*cos(r)^2)/(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2) + (2*C6*w*cos(r)^2)/(exp(k*t + 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2)) + (2*C5*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - k*t)*sin(r)^2)/(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2) + (2*C6*w*sin(r)^2)/(exp(k*t + 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2)) - (g*k*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k^3*cos(r) + 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 + 8*i*w^3*cos(r)^3 + 8*i*w^3*cos(r)*sin(r)^2)) + (g*k*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k^3*cos(r) - 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 - 8*i*w^3*cos(r)^3 - 8*i*w^3*cos(r)*sin(r)^2)) + (8*g*t*w^3*cos(r)^4)/(k^4*cos(r) + 8*k^2*w^2*cos(r)^3 + 8*k^2*w^2*cos(r)*sin(r)^2 + 16*w^4*cos(r)^5 + 32*w^4*cos(r)^3*sin(r)^2 + 16*w^4*cos(r)*sin(r)^4) - (C5*k*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - k*t)*(- cos(r)^2 - sin(r)^2)^(1/2))/(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2) + (C6*k*(- cos(r)^2 - sin(r)^2)^(1/2))/(exp(k*t + 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*(k^2*cos(r) + 4*w^2*cos(r)^3 + 4*w^2*cos(r)*sin(r)^2)) - (g*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)^2)/(2*(k^3*cos(r) + 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 + 8*i*w^3*cos(r)^3 + 8*i*w^3*cos(r)*sin(r)^2)) - (g*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)^2)/(2*(k^3*cos(r) - 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 - 8*i*w^3*cos(r)^3 - 8*i*w^3*cos(r)*sin(r)^2)) - (g*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)^4)/(2*(k^3*cos(r) + 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 + 8*i*w^3*cos(r)^3 + 8*i*w^3*cos(r)*sin(r)^2)) - (g*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)^4)/(2*(k^3*cos(r) - 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 - 8*i*w^3*cos(r)^3 - 8*i*w^3*cos(r)*sin(r)^2)) - (g*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^2)/(2*(k^3*cos(r) + 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 + 8*i*w^3*cos(r)^3 + 8*i*w^3*cos(r)*sin(r)^2)) - (g*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^2)/(2*(k^3*cos(r) - 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 - 8*i*w^3*cos(r)^3 - 8*i*w^3*cos(r)*sin(r)^2)) + (g*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^4)/(2*(k^3*cos(r) + 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 + 8*i*w^3*cos(r)^3 + 8*i*w^3*cos(r)*sin(r)^2)) + (g*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^4)/(2*(k^3*cos(r) - 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 - 8*i*w^3*cos(r)^3 - 8*i*w^3*cos(r)*sin(r)^2)) + (8*g*t*w^3*cos(r)^2*sin(r)^2)/(k^4*cos(r) + 8*k^2*w^2*cos(r)^3 + 8*k^2*w^2*cos(r)*sin(r)^2 + 16*w^4*cos(r)^5 + 32*w^4*cos(r)^3*sin(r)^2 + 16*w^4*cos(r)*sin(r)^4) + (2*g*k^2*t*w*cos(r)^2)/(k^4*cos(r) + 8*k^2*w^2*cos(r)^3 + 8*k^2*w^2*cos(r)*sin(r)^2 + 16*w^4*cos(r)^5 + 32*w^4*cos(r)^3*sin(r)^2 + 16*w^4*cos(r)*sin(r)^4) - (g*k*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k^3*cos(r) + 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 + 8*i*w^3*cos(r)^3 + 8*i*w^3*cos(r)*sin(r)^2)) + (g*k*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k^3*cos(r) - 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 - 8*i*w^3*cos(r)^3 - 8*i*w^3*cos(r)*sin(r)^2)) + (g*k*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k^3*cos(r) + 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 + 8*i*w^3*cos(r)^3 + 8*i*w^3*cos(r)*sin(r)^2)) - (g*k*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k^3*cos(r) - 2*i*k^2*w*cos(r) + 4*k*w^2*cos(r)^3 + 4*k*w^2*cos(r)*sin(r)^2 - 8*i*w^3*cos(r)^3 - 8*i*w^3*cos(r)*sin(r)^2))

>> S.y4

ans =

(C5*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - k*t)*(- cos(r)^2 - sin(r)^2)^(1/2))/cos(r) - (C6*(- cos(r)^2 - sin(r)^2)^(1/2))/(exp(k*t + 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)) + (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k*cos(r) + 2*i*w*cos(r))) - (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k*cos(r) - 2*i*w*cos(r))) - (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k*cos(r) + 2*i*w*cos(r))) + (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k*cos(r) - 2*i*w*cos(r))) + (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k + 2*i*w)) - (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)*(- cos(r)^2 - sin(r)^2)^(1/2))/(4*(k - 2*i*w))

>> S.y5

ans =

(C3*k^3)/(k^3 + 4*k*w^2*cos(r)^2 + 4*k*w^2*sin(r)^2) - (C4*k^2)/(exp(k*t)*(k^3 + 4*k*w^2*cos(r)^2 + 4*k*w^2*sin(r)^2)) + (g*k*sin(r)^2)/(k^3 + 4*k*w^2*cos(r)^2 + 4*k*w^2*sin(r)^2) + (4*g*w^2*sin(r)^4)/(k^4 + 4*k^2*w^2*cos(r)^2 + 4*k^2*w^2*sin(r)^2) + (g*k^2*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2)))/(4*(k^4 + 2*i*k^3*w + 4*k^2*w^2*cos(r)^2 + 4*k^2*w^2*sin(r)^2 + 8*i*k*w^3*cos(r)^2 + 8*i*k*w^3*sin(r)^2)) + (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32*k^2*w^4*cos(r)^2*sin(r)^2 + 16*k^2*w^4*sin(r)^4) - (g*k*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4 + 2*i*k^3*w + 4*k^2*w^2*cos(r)^2 + 4*k^2*w^2*sin(r)^2 + 8*i*k*w^3*cos(r)^2 + 8*i*k*w^3*sin(r)^2)) + (g*k*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4 - 2*i*k^3*w + 4*k^2*w^2*cos(r)^2 + 4*k^2*w^2*sin(r)^2 - 8*i*k*w^3*cos(r)^2 - 8*i*k*w^3*sin(r)^2)) - (g*k*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4 + 2*i*k^3*w + 4*k^2*w^2*cos(r)^2 + 4*k^2*w^2*sin(r)^2 + 8*i*k*w^3*cos(r)^2 + 8*i*k*w^3*sin(r)^2)) + (g*k*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4 - 2*i*k^3*w + 4*k^2*w^2*cos(r)^2 + 4*k^2*w^2*sin(r)^2 - 8*i*k*w^3*cos(r)^2 - 8*i*k*w^3*sin(r)^2)) + (g*k*w*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4 + 2*i*k^3*w + 4*k^2*w^2*cos(r)^2 + 4*k^2*w^2*sin(r)^2 + 8*i*k*w^3*cos(r)^2 + 8*i*k*w^3*sin(r)^2)) - (g*k*w*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^2*(- cos(r)^2 - sin(r)^2)^(1/2))/(2*(k^4 - 2*i*k^3*w + 4*k^2*w^2*cos(r)^2 + 4*k^2*w^2*sin(r)^2 - 8*i*k*w^3*cos(r)^2 - 8*i*k*w^3*sin(r)^2)) - (16*g*k*t*w^4*cos(r)^2*sin(r)^2)/(k^6 + 8*k^4*w^2*cos(r)^2 + 8*k^4*w^2*sin(r)^2 + 16*k^2*w^4*cos(r)^4 + 32*k^2*w^4*cos(r)^2*sin(r)^2 + 16*k^2*w^4*sin(r)^4)
>> S.y6

ans =

C4/exp(k*t) + C5*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - k*t) + C6/exp(k*t + 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2)) - (g*sin(r)^2)/k - (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2)))/(4*(k + 2*i*w)) - (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w))/(4*(k - 2*i*w)) - (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*cos(r)^2)/(4*(k + 2*i*w)) - (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*cos(r)^2)/(4*(k - 2*i*w)) + (g*exp(2*i*t*w - 2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2))*sin(r)^2)/(4*(k + 2*i*w)) + (g*exp(2*t*w*(- cos(r)^2 - sin(r)^2)^(1/2) - 2*i*t*w)*sin(r)^2)/(4*(k - 2*i*w))
不知道为什么,答案就是那么多.