saraha

5 Reputation

One Badge

11 years, 158 days

MaplePrimes Activity


These are replies submitted by saraha

@J4James 

by any chance do you know how to use scilab?

I have to solve the same equation but with matrices (state space equation) on scilab and put it into a program which asks the values m, c, k and F(t)

@J4James 

restart;

ODE := m*diff(x(t),t$1) + k*x(t) = F(t);

dsolve (ODE);

m:=1 : c:=1 : k:=1 : F(t):= t² : #say

ics := x(o)=0, D(x)(0) = 0; #say

dsolve({ODE,ics});

Y;= rhs(x(t) = 4/3*e^(-1/2t) *sin(1/2*sqrt(3)*t)*sqrt(3) +t² - 2t);

plot(Y,t=0..10);

this is the work sheet

@J4James 

 

MapleProject.mw

restart

DE := m*(diff(x(t), `$`(t, 2)))+c*(diff(x(t), `$`(t, 1)))+k*x(t) = F(t)

m*(diff(diff(x(t), t), t))+c*(diff(x(t), t))+k*x(t) = F(t)

(1)

dsolve(DE)

x(t) = exp((1/2)*(-c+(c^2-4*k*m)^(1/2))*t/m)*_C2+exp(-(1/2)*(c+(c^2-4*k*m)^(1/2))*t/m)*_C1+((Int(F(t)*exp(-(1/2)*(-c+(c^2-4*k*m)^(1/2))*t/m), t))*exp(t*(c^2-4*k*m)^(1/2)/m)-(Int(F(t)*exp((1/2)*(c+(c^2-4*k*m)^(1/2))*t/m), t)))*exp(-(1/2)*(c+(c^2-4*k*m)^(1/2))*t/m)/(c^2-4*k*m)^(1/2)

(2)

"m:=1:c:=1:k:=1:F(t):=t^2: #` say`"

ics := x(0) = 0, (D(x))(0) = 0

x(0) = 0, (D(x))(0) = 0

(3)

dsolve({DE, ics})

x(t) = (4/3)*exp(-(1/2)*t)*sin((1/2)*3^(1/2)*t)*3^(1/2)+t^2-2*t

(4)

Y := rhs(x(t) = (4/3)*exp(-(1/2)*t)*sin((1/2)*sqrt(3)*t)*sqrt(3)+t^2-2*t);

(4/3)*exp(-(1/2)*t)*sin((1/2)*3^(1/2)*t)*3^(1/2)+t^2-2*t

(5)

plot(Y, t = 0 .. 10);

 

``

``


Download MapleProject.mw

            

MapleProject.mw

@J4James here is the work sheet

The link "mck.mw" doesn't work

I have another question, when I plot the graph, I don't get the right graph : the curve tends to + infinity

@J4James 

What is "mck.mw" ? Is it a command on maple to model the mass spring damper system?

@J4James 

hi! thanks for your reply!

I still have some problems : when I try to plot the equation, it doesn't work and when I try to model the system with the code which is given in the link you gave me maple doesn't understand the code

Page 1 of 1