Skip to main content
added 1725 characters in body
Source Link
1_student
  • 635
  • 4
  • 7

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
            )
          )[]
        ]:

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
            )
          )[]
        ]:
Clean up, grammar.
Source Link
eyorble
  • 9.6k
  • 1
  • 25
  • 38

I can' tcan't solve (analytically or numerically) the following matrix differential equation by hand.

I want to solve it by programs like mathematica etcusing Mathematica or similar. I know that I must write mymy effort about code.

M V''[t] + C V'[t] +K V(t)== P(t)?

But I am reallya beginner in such a programs.

Could you help me pls. ?

If you give some hints, I will be very pleasured.

The question : https://math.stackexchange.com/questions/2680397/solving-following-second-order-matrix-differential-equation

I can' t solve (analytically or numerically) following matrix differential equation by hand.

I want to solve it by programs like mathematica etc. I know that I must write my effort about code.

M V''[t] + C V'[t] +K V(t)== P(t)?

But I am really beginner in such a programs.

Could you help me pls. ?

If you give some hints, I will be very pleasured.

The question : https://math.stackexchange.com/questions/2680397/solving-following-second-order-matrix-differential-equation

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

Source Link
1_student
  • 635
  • 4
  • 7

Solving Matrix Differential equations with Mathematica

I can' t solve (analytically or numerically) following matrix differential equation by hand.

I want to solve it by programs like mathematica etc. I know that I must write my effort about code.

M V''[t] + C V'[t] +K V(t)== P(t)?

But I am really beginner in such a programs.

Could you help me pls. ?

If you give some hints, I will be very pleasured.

The question : https://math.stackexchange.com/questions/2680397/solving-following-second-order-matrix-differential-equation