I can't solve (analytically or numerically) the following matrix differential equation by hand.
I want to solve it using Mathematica or similar. I know that I must write my effort about code.
M V''[t] + C V'[t] +K V(t)== P(t)?
But I am a beginner in such a programs.
The question : https://math.stackexchange.com/questions/2680397/solving-following-second-order-matrix-differential-equation
I have a code for Matrices in Maple.
Can we transform the Maple code to Mathematica code?
M:= Matrix
( n,
n,
shape=identity
)
+
alpha*Matrix
( n,
n,
(i,j)->sin(i*Pi*nu*t/l)*sin(j*Pi*nu*t/l)
):
C:= 2*alpha*Matrix
( n,
n,
(i,j)->(j*Pi*nu/l)*sin(i*Pi*nu*t/l)*cos(j*Pi*nu*t/l)
):
K:= Matrix
( n,
n,
(i,j)-> `if`( i=j,
(j*Pi/l)^4*E*J/(rho*A)+(j*Pi/l)^2*N/(rho*A),
0
)
)
-
alpha*Matrix
( n,
n,
(i,j)->(j*Pi*nu/l)^2*sin(i*Pi*nu*t/l)*sin(j*Pi*nu*t/l)
):
VV:= Vector[column]
( n,
j->V[j](t)
):
FF:=Vector[column]
( n,
j->F[j](t)
):
PP:= P/(rho*A)
*
Vector[column]
( n,
j->sin(j*Pi*nu*t/l)
)+FF:
params:=( indets(sys1, name)
minus
{Pi,t}
)=~1:
ics:= [ Equate
( eval(VV,t=0),
Vector[column]
( n,
fill=0
)
)[],
Equate
( convert(eval(diff~(VV,t),t=0),D),
Vector[column]
( n,
fill=0
)
)[]
]: