1.一质量块1m=1Kg悬挂在一弹簧mNK/1023的下端,处于平衡状态,如图1所示。第二个质量块2m=1Kg自高度h=0.1m处落下,然后与1m一起做自由振动。试写出两质量块的运动方程。图1restart:delta[0]:=m2*g/k:#初始位移eq:=(m1+m2)*diff(x(t),t$2)=(m1+m2)*g-k*(delta[0]+x):#振动微分方程eq:=lhs(eq)-rhs(eq)=0:#合并同类项eq:=subs(diff(x(t),t$2)=DDx,eq):#代换eq:=simplify(eq);#化简X:=A*sin(omega[0]*t+theta);#位移结果)sin(0tAXomega[0]:=sqrt(k/(m1+m2)):#求固有角频率210mmKx[0]:=-delta[0]:#初始位移条件v1:=sqrt(2*g*h):#求1m速度v2:=m2*v1/(m1+m2);#动量定理求2m速度v[0]:=v2:#初始速度条件A:=sqrt(x[0]^2+v[0]^2/omega[0]^2):#202020vxAtheta:=arctan(omega[0]*x[0]/v[0]):#)arctan(000vxm1:=1:m2:=1:#kgm11kgm12h:=0.1:k:=2*10^3:#mh1.0mNk/1023g:=9.8:#2/8.9smgomega[0]:=evalf(omega[0],4);#计算0A:=evalf(A,4);#计算Atheta:=evalf(theta,4);#计算X:=evalf(X);#计算X答:两质量块的运动方程为X=0.02267sin(31.62t-0.2178)2.简谐激振力,偏心质量和支撑运动引起的强迫振动的振幅放大因子与频率比和阻尼比之间的关系曲线。restart:forkfrom0to10do#按阻尼循环开始xi[k]:=0.1*k:#阻尼比zeta[k]:=1/sqrt((1-lambda^2)^2+4*xi[k]^2*lambda^2):#振幅比od:#按阻尼循环结束plot([seq(zeta[k],k=0..10)],lambda=0..10,view=[0..3,0..6],tickmarks=[4,6]);#绘制幅频关系曲线restart:forkfrom0to10do#按阻尼循环开始xi[k]:=0.1*k:#阻尼比zeta[k]:=lambda^2/sqrt((1-lambda^2)^2+4*xi[k]^2*lambda^2):#振幅比od:#按阻尼循环结束plot([seq(zeta[k],k=0..10)],lambda=0..10,view=[0..3,0..6],tickmarks=[4,6]);#绘制幅频关系曲线restart:forkfrom0to10do#按阻尼循环开始xi[k]:=0.1*k:#阻尼比zeta[k]:=sqrt((1+(2*lambda*xi[k])^2)/((1-lambda^2)^2+4*xi[k]^2*lambda^2)):#振幅比od:#按阻尼循环结束plot([seq(zeta[k],k=0..10)],lambda=0..10,view=[0..3,0..6],tickmarks=[4,6]);#绘制幅频关系曲线(a)(b)(c)图23.一机器系如图3所示。已知机器重1W=90㎏,减振器重2W=2.25㎏,若机器上有一偏心块重0.5㎏,偏心距e=1cm,机器转速n=1800rpm。试求:(1)减振器的弹簧刚度2K多大,才能使机器振幅为零;(2)此时机器的振幅2B为多大。图3restart:F[0]:=F0*sin(omega*t):#外激力)sin(0tFFF0:=m*e*omega^2:#2meFeq[1]:=W[1]/g*diff(x[1](t),t$2)+k[1]*x[1]+k[2]*x[2]=F[0]#1W的运动微分方程eq[2]:=W[2]/g*diff(x[2](t),t$2)+k[2]*x[2]=0:#2W的运动微分方程eq:=d-omega^2=0:#满足条件02deq:=subs(d=k[2]/(W[2]/g),eq):#代换solve({eq},{k[2]}):#求解2kk[2]:=omega^2*W[2]/g:#gWk222omega:=2*Pi*N/60:#602NW[1]:=90:W[2]:=2.25:N:=1800:g:=980:#kgW901kgW25.22min/1800rN2/980scmgk[2]:=evalf(k[2],3);#求解2kx[2]:=B[2]*sin(omega*t):#tBxsin22B[2]:=F0/k[2]:#22kFBm:=0.5/980:e:=1:#mskgm/9805.02e=1B[2]:=evalf(B[2],3);#计算2B答:减震器的弹簧刚度2K为81.4㎏/cm,减震器的振幅2B为0.22cm。4.试求如图4所示质量为1m和2m组成的双摆的动能和势能,并以转角和2为广义坐标建立系统的运动微分方程。图4restart:U:=(m[1]+m[2])*g*l[1]*(1-cos(theta[1]))+m[2]*g*l[2]*(1-cos(theta[2])):#系统势能T:=1/2*(m[1]+m[2])*l[1]^2*diff(theta[1](t),t)^2+m[2]*l[1]*l[2]*cos(theta[2]-theta[1])*diff(theta[1](t),t)*diff(theta[2](t),t)+1/2*m[2]*l[2]^2*diff(theta[2](t),t)^2:#系统动能L:=T-U:#拉格朗日函数L:=subs(diff(theta[1](t),t)=Dtheta[1],diff(theta[2](t),t)=Dtheta[2],L):#代换Ltheta[1]:=diff(L,theta[1]):#1LLDtheta[1]:=diff(L,Dtheta[1]):#1LLDtheta[1]:=subs(Dtheta[1]=diff(theta[1](t),t),Dtheta[2]=diff(theta[2](t),t),LDtheta[1]):#代换eq[1]:=Ltheta[1]-diff(LDtheta[1],t)=0:#拉格朗日方程011LLdtdeq[1]:=subs(diff(theta[1](t),t$2)=DDtheta,diff(theta[2](t),t$2)=DDtheta,eq[1]);#代换Ltheta[2]:=diff(L,theta[2]):#2LLDtheta[2]:=diff(L,Dtheta[2]):#2LLDtheta[2]:=subs(Dtheta[2]=diff(theta[2](t),t),Dtheta[1]=diff(theta[1](t),t),LDtheta[2]):#代换eq[2]:=Ltheta[2]-diff(LDtheta[2],t)=0:#拉格朗日方程022LLdtdeq[2]:=subs(diff(theta[1](t),t$2)=DDtheta,diff(theta[2](t),t$2)=DDtheta,eq[2]);#代换答:运动方程为:5.质量为M的水平台用长为l的绳子悬挂起来,如图5所示,半径为r的小球,质量为m,沿水平台做无滑动的滚动,试以θ和x为广义坐标列出此系统的运动微分方程。图5restart:T[1]:=1/2*M*l^2*diff(theta(t),t)^2:#平台动能T[2]:=1/2*m*((l*diff(theta(t),t))^2+diff(x(t),t)^2+2*l*diff(x(t),t)*diff(theta(t),t)*cos(theta)):#小球平动动能T[3]:=1/2*2/5*m*diff(x(t),t)^2:#小球转动动能T:=T[1]+T[2]+T[3]:#系统动能U:=(M+m)*g*l*(1-cos(theta)):#系统势能L:=T-U:#拉格朗日函数L:=subs(diff(theta(t),t)=Dtheta,diff(x(t),t)=Dx,L):#代换Lx:=diff(L,x):#xLLDx:=diff(L,Dx):#xLLDx:=subs(Dx=diff(x(t),t),Dtheta=diff(theta(t),t),LDx):#代换eq[1]:=Lx-diff(LDx,t)=0:#拉格朗日方程0xLxLdtdeq[1]:=subs(diff(theta(t),t$2)=DDtheta,diff(x(t),t$2)=DDx,diff(theta(t),t)=Dtheta,eq[1]):#代换eq[1]:=expand(-eq[1]/7*5);#化简展开L:=subs(theta(t)=theta,L):#代换Ltheta:=diff(L,theta):#LLDtheta:=diff(L,Dtheta):#LLDtheta:=subs(Dx=diff(x(t),t),Dtheta=diff(theta(t),t),theta=theta(t),LDtheta):#代换eq[2]:=Ltheta-diff(LDtheta,t)=0:#拉格朗日方程0LLdtdeq[2]:=subs(diff(theta(t),t$2)=DDtheta,diff(x(t),t$2)=DDx,diff(theta(t),t)=Dtheta,-eq[2]):#代换eq[2]:=subs(diff(x(t),t)=Dx,diff(theta(t)(t),t$2)=DDtheta,theta(t)=theta,eq[2]):#代换eq[2]:=expand(eq[2]/l):#展开eq[2]:=g*sin(theta)+2*l*DD(theta)+m/(m+M)*DDx*cos(theta)=0;#化简答:运动微分方程为:6.图6所示长度为l的绳子,穿过水平面上小孔O,并在两端各联接质量为1m和2m的两质点,2m沿垂直线Oz运动,m1在水平面上运动,略去摩擦力及绳子的重量和弹性影响,试以和z为广义坐标列出此系统的运动微分方程。restart:T:=1/2*m[1]*(l-z)^2*diff(theta(t),t)^2+1/2*(m[2]+m[1])*diff(z(t),t)^2:#系统动能U:=-m[2]*g*z(t):#系统势能L:=T-U:#拉格朗日方程L:=subs(diff(theta(t),t)=Dtheta,L):#代换L:=subs(diff(z(t),t)=Dz,z(t)=z,L):#代换Lz:=diff(L,z):#zLLDz:=diff(L,Dz):#zLLDz:=subs(Dz=diff(z(t),t),LDz):#代换eq[1]:=Lz-diff(LDz,t)=0:#拉格朗日函数0zLzLdtdeq[1]:=subs(diff(z(t),t$2)=DDz,eq[1]):#代换L:=subs(Dtheta=diff(theta(t),t),L):#代换Ltheta:=