Items tagged with system system Tagged Items Feed

Hi,

I need to solve the linear system  AX=F  without using any  Linearalgebra package. 

 

A is a tridiagonal matrix ( band matrix);

X is vector of size n.

F is the right hand side of my equation AX=F.

F: given, A given, Find X???

restart;

A := n-> Matrix(n,scan=band[1,1],[[seq(b[i],i=2..n)], [seq(a[i],i=1..n)],
                [seq(c[i],i=1..n-1)]] ):
X:=n->[seq(x[i],i=1..n)]:
F:=n->[seq(d[i],i=1..n)]:

 

Thanks

Hi everybody.

 

There are several weeks I'm on a school project and for it we need a Maplesim Simulation. It contains a sine voltage (source), a diode bridge (simplify), a condenser and a resistor. The problem is : when I want to simulate it, an error message appears : System is undetermined. I dopn't understand why I've this and from where's the problem...

 

If you could help me asap, it will be very very nice.

 

Have a nice day.

Hi.

 

Please, I need your help, to form and solve a linear system.

1) I want to solve the system (13) using "GenerateMatrix" , the system is   evaluated  at  point x[m]=-a+m*h, m=0..2N , In my code I get  equation (15), ( I think it's okay), I juste use subs, x=x[m].
My function, ph(x) approximate by phi[m]=phi(x[m]).  and I want to compute the vecteur [phi[1], phi[2],...,phi[2*N+1]] is my solution.

2) The nodes, are x[k]=-a+k*h, k=0..2*N;  I want to display these nodes in the x-axis, i write the code with the names of each point, but there is an error.

There is some a mistake in my code maple.

Here, my code.

Fred.mw

 

 

 

 

Hi, everyone!

I need help.

There are a system of 2 pde's: 

diff(Y(x, t), x$2) = exp(-2*x*b)*(A(x, t)-Y(x, t)), diff(A(x, t), t) = exp(-2*x*b)*(Y(x, t)-A(x, t)) 

and initial and boundary conditions: 

A(x, 0) = 0, Y(0, t) = 0.1, (D[1](Y))(0, t) = 0. 

Goal: 
For each b = 0, 0.05, 0.1. 
1)to plot 3-d  Y(x,t): 0<=x<=20,0<=t<=7. 
2)to plot  Y(x,4). 

Are there any methods with no finite-difference mesh?


I realized the  methods such as  pds1 := pdsolve(sys, ibc, numeric, time = t, range = 0 .. 7)  can't help me:

Error, (in pdsolve/numeric/match_PDEs_BCs) cannot handle systems with multiple PDE describing the time dependence of the same dependent variable, or having no time dependence 

I found something, that can solve my system analytically: 
pds := pdsolve(sys), where sys - my system without initial and boundary conditions. At the end of the output: huge monster, consisted of symbols and numbers :) And I couldn't affiliate init-bound conditions to it.

I use Maple 13. 

Is it possible to solve (numerically or symbolically) the system of PDEs
sys:={diff(Y(x, t), x$2) = exp(-2*x*b)*(A(x, t)-Y(x, t)), diff(A(x, t), t) = exp(-2*x*b)*(Y(x, t)-A(x, t)) }
under the conditions
ibc:={A(x, 0) = 0, Y(0, t) = 0.1, D[1](Y)(0, t) = 0},
 where the parameter b takes the values 0,0.05,0.1, in Maple? The ranges are t=0..7, x=0..20.

Hi all 

I have the following segment of maple program which belongs to time delay systems dynamic. here C=X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P, is a matrix(vector) which comes from reordering the system terms and my goal is to minimizing J:=X.E.Transpose(X)+U.E.Transpose(U), subject to constraint C=0, but i don't know how to do so.

I will be so grateful if anyone can guide me

best wishes

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department


restart:
with(Optimization):
with(LinearAlgebra):
macro(LA= LinearAlgebra):
L:=1:  r:=2:  tau:= 1:
interface(rtablesize= 2*r+1):

Z:= Matrix(
     2*r+1, 2*r+1,
     [tau,
      seq(evalf((L/(2*(iz-1)*Pi))*sin(2*(iz-1)*Pi*tau/L)), iz= 2..r+1),
      seq(evalf((L/(2*(iz-1-r)*Pi))*(1-cos(2*(iz-1-r)*Pi*tau/L))), iz= r+2..2*r+1)
      ],
     scan= columns,
     datatype= float[8]
);
                        
Dtau00:= < 1 >:
Dtau01:= Vector[row](r):
Dtau02:= Vector[row](r):
Dtau10:= Vector(r):
Dtau20:= Vector(r):

Dtau1:= LA:-DiagonalMatrix([seq(evalf(cos(2*i*Pi*tau/L)), i= 1..r)]):
Dtau2:= LA:-DiagonalMatrix([seq(evalf(sin(2*i*Pi*tau/L)), i= 1..r)]):
Dtau3:= -Dtau2:
Dtau4:= copy(Dtau1):

Dtau:= < < Dtau00 | Dtau01 | Dtau02 >,
         < Dtau10 | Dtau1  | Dtau2  >,
         < Dtau20 | Dtau3  | Dtau4  > >;
 
P00:= < L/2 >:
P01:= Vector[row](r):
P02:= Vector[row](r, j-> evalf(-L/j/Pi), datatype= float[8]):
P10:= Vector(r):
P20:= Vector(r, i-> evalf(L/2/i/Pi)):
P1:= Matrix(r,r):
P2:= LA:-DiagonalMatrix(P20):
P3:= LA:-DiagonalMatrix(-P20):
P4:= Matrix(r,r):

P:= < < P00 | P01 | P02 >,
      < P10 | P1  | P2  >,
      < P20 | P3  | P4  > >;

interface(rtablesize=2*r+1):    # optionally
J:=Vector([L, L/2 $ 2*r]):      # Matrix([[...]]) would also work here

E:=DiagonalMatrix(J);

X:=  Vector[row](2*r+1,symbol=a);
U:=Vector[row](2*r+1,symbol=b);

X0:= Vector[row](2*r+1,[1]);
G:=Vector[row](2*r+1,[1]);
C:=simplify(X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P);

Z := Matrix(5, 5, {(1, 1) = 1., (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0., (3, 4) = 0., (3, 5) = 0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 0., (4, 5) = 0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0.})

Dtau := Matrix(5, 5, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 1., (2, 3) = 0, (2, 4) = 0., (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1., (3, 4) = 0, (3, 5) = 0., (4, 1) = 0, (4, 2) = -0., (4, 3) = -0., (4, 4) = 1., (4, 5) = 0, (5, 1) = 0, (5, 2) = -0., (5, 3) = -0., (5, 4) = 0, (5, 5) = 1.})

P := Matrix(5, 5, {(1, 1) = 1/2, (1, 2) = 0, (1, 3) = 0, (1, 4) = -.318309886100000, (1, 5) = -.159154943000000, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = .1591549430, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0.7957747152e-1, (4, 1) = .1591549430, (4, 2) = -.159154943000000, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0.7957747152e-1, (5, 2) = 0, (5, 3) = -0.795774715200000e-1, (5, 4) = 0, (5, 5) = 0})

E := Matrix(5, 5, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 1/2, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1/2, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1/2, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 1/2})

X := Vector[row](5, {(1) = a[1], (2) = a[2], (3) = a[3], (4) = a[4], (5) = a[5]})

U := Vector[row](5, {(1) = b[1], (2) = b[2], (3) = b[3], (4) = b[4], (5) = b[5]})

X0 := Vector[row](5, {(1) = 1, (2) = 0, (3) = 0, (4) = 0, (5) = 0})

G := Vector[row](5, {(1) = 1, (2) = 0, (3) = 0, (4) = 0, (5) = 0})

C := Vector[row](5, {(1) = 1.500000000*a[1]-2.-.1591549430*a[4]-0.7957747152e-1*a[5]-.5000000000*b[1]-.1591549430*b[4]-0.7957747152e-1*b[5], (2) = a[2]+.1591549430*a[4]+.1591549430*b[4], (3) = a[3]+0.7957747152e-1*a[5]+0.7957747152e-1*b[5], (4) = a[4]+.3183098861*a[1]-.1591549430*a[2]+.3183098861*b[1]-.1591549430*b[2], (5) = a[5]+.1591549430*a[1]-0.7957747152e-1*a[3]+.1591549430*b[1]-0.7957747152e-1*b[3]})

(1)

J:=X.E.Transpose(X)+U.E.Transpose(U);

J := a[1]^2+(1/2)*(a[2]^2)+(1/2)*(a[3]^2)+(1/2)*(a[4]^2)+(1/2)*(a[5]^2)+b[1]^2+(1/2)*(b[2]^2)+(1/2)*(b[3]^2)+(1/2)*(b[4]^2)+(1/2)*(b[5]^2)

(2)

Minimize(J,{C=0});






Error, (in Optimization:-NLPSolve) invalid arguments

 

#XP:=-.015+X[1]+add(X[l+1]*f1(l)+X[r+l+1]*f2(l), l= 1..r):
#plot([XP,T1], t= 0..1);#,legend= "Solution Of x(t) with r=50"):

 

 

 

 

 

 

Download work1.mwswork1.mws

Hi,

What is the reason/Why: 

 

Error, (in dsolve/numeric/bvp) unable to achieve requested accuracy of 0.1e-5 with maximum 128 point mesh (was able to get 0.66e-1), consider increasing `maxmesh` or using larger `abserr`

Thanks for the help :)

I was required to purchase Maple 17 for my upcoming Calculus III course, and until now, I have been using my TI-Nspire CAS CX for all of my CAS needs.  I am going through various tutorials/labs in an effort to learn how to use the Maple 17 Software. As a part of this process, I am attempting to solve a system of equations and was told to use the following command:

>solve({2*x+3*y=7,5*x+8*y=9},{x,y}); 

in order to receive the answer 

{y=-17,x=29}.

 

Instead, I have received the following error message, which has no help attached to it through the help page.

solve({2*x+3*y = 7, 5*x+8*y = 9}, {x, y});
Warning, solving for expressions other than names or functions is not recommended.

I am hoping this has something to do with Mac vs. Windows software, and that it has a simple solution.  I would greatly appreciate any guidance!

Hi, can I get some help with this?


The question is:

Consider the following IVP for a mass of m = 2 kg attached to a spring with a spring constant k = 9 N/m. The spring mass system is in a medium with damping constant b.

2y" + by' + 9y = 0

y(0) = 0, D(y)(0) = -3 

 

It then asks find three values b1, b2, b3 where b1 is underdamped, b2 is critical, b3 is over. 

I set b1 as 1, b2 as sqt 72, b3 as 9. 

 

Then it asks to find the quasi period. 

I can't get my quasi period right. My answer is 2pi/ sqrt (4.5).

 

Any help?  

Hi MaplePrime-ers!

I've been using the Maple(17) toolbox in Matlab(2012b) to quickly enumerate systems of equations by: (i) solving them symbolically, (ii) using unapply to make them functions, (iii) then supplying the points (driver equations) to get the system solution.  Speed is a must, because there may be 3 million+ systems to solve.  Symbolics is also very important because I am evaluating topology, so the structure of the equations may change, and therefore a functional approach will not work.

I have had success (seen in the first code snippet).  I would like similiar behaviour in the second code snippet, but sometimes I get 'solutions may be lost' as an error message,  or 'Error, (in unapply) variables must be unique and of type name'

The system of equations include:  Linear equations, 5th order polynomials, absolute functions, and pieceiwse functions.

Here is code with a topology that solves:

#Interconnection Equations
eq2[1] := FD_T + EM2_T = 0;
eq2[2] := ICE_T + GEN_T = 0;
eq2[3] := EM2_A + GEN_A + BAT_A = 0;
eq2[4] := -FD_W + EM2_W = 0;
eq2[5] := -ICE_W + GEN_W = 0;
eq2[6] := -EM2_V + GEN_V = 0;
eq2[7] := -EM2_V + BAT_V = 0;

#ICE
eq_c[1] := ICE_mdot_g=((671.5) + (-21.94)*ICE_T + (0.1942)*ICE_W + (0.5113)*ICE_T^2 + (-0.01271)*ICE_T*ICE_W + ( -0.0008761)*ICE_W^2 + (-0.006071)*ICE_T^3 + (9.867e-07)*ICE_T^2*ICE_W + (5.616e-05)*ICE_T*ICE_W^2 + (1.588e-06)*ICE_W^3 + (3.61e-05)*ICE_T^4 + (8.98e-07)*ICE_T^3*ICE_W + (-2.814e-07)*ICE_T^2*ICE_W^2 + (-8.121e-08)*ICE_T*ICE_W^3 + ( -8.494e-08 )*ICE_T^5 + (-2.444e-09)*ICE_T^4*ICE_W + (-9.311e-10)*ICE_T^3*ICE_W^2 + ( 5.835e-10)*ICE_T^2*ICE_W^3 ) *1/3600/1000 * ICE_T * ICE_W;

#BAT
eq_c[2] := BAT = 271;

#EM2
EM2_ReqPow_eq := (-148.3) + (4.267)*abs(EM2_W) + (12.77)*abs(EM2_T) + (-0.0364)*abs(EM2_W)^2 + ( 1.16)*abs(EM2_W)*abs(EM2_T) + (-0.258)*abs(EM2_T)^2 + ( 0.0001181)*abs(EM2_W)^3 + (-0.0005994)*abs(EM2_W)^2*abs(EM2_T) + ( 0.0001171)*abs(EM2_W)*abs(EM2_T)^2 + (0.001739 )*abs(EM2_T)^3 + (-1.245e-07 )*abs(EM2_W)^4 + ( 1.2e-06)*abs(EM2_W)^3*abs(EM2_T) + ( -1.584e-06)*abs(EM2_W)^2*abs(EM2_T)^2 + ( 4.383e-07)*abs(EM2_W)*abs(EM2_T)^3 + (-2.947e-06)*abs(EM2_T)^4;
eq_c[3] := EM2_P = piecewise( EM2_T = 0, 0, EM2_W = 0, 0, EM2_W*EM2_T < 0,-1 * EM2_ReqPow_eq, EM2_ReqPow_eq);
eq_c[4] := EM2_A = EM2_P/EM2_V;

#GEN
GEN_ReqPow_eq:= (-5.28e-12) + ( 3.849e-14)*abs(GEN_W) + (-71.9)*abs(GEN_T) + (-1.168e-16)*abs(GEN_W)^2 +(1.296)*abs(GEN_W)*abs(GEN_T) + (2.489)*abs(GEN_T)^2 + (1.451e-19)*abs(GEN_W)^3 + (0.0001326)*abs(GEN_W)^2*abs(GEN_T) + (-0.008141)*abs(GEN_W)*abs(GEN_T)^2 + (-0.004539)*abs(GEN_T)^3 +(-6.325e-23)*abs(GEN_W)^4 + (-2.091e-07)*abs(GEN_W)^3*abs(GEN_T) + ( 3.455e-06)*abs(GEN_W)^2*abs(GEN_T)^2 + ( 2.499e-05)*abs(GEN_W)*abs(GEN_T)^3 + (-5.321e-05)*abs(GEN_T)^4;
eq_c[5] := GEN_P = piecewise( GEN_T = 0, 0, GEN_W = 0, 0, GEN_W*GEN_T < 0,-1 * GEN_ReqPow_eq, GEN_ReqPow_eq);
eq_c[6] := GEN_A = GEN_P/GEN_V;

#ASSUMPTIONS
assume(BAT_V::nonnegative);
assume(FD_W::nonnegative);

#FINAL EQUATIONS

sys_eqs2 := convert(eq2,set) union {eq_c[1],eq_c[2],eq_c[3],eq_c[4],eq_c[5],eq_c[6]};

#Selecting which variables to solve for:

drivers2:= { ICE_T,ICE_W,FD_T,FD_W};
symvarnames2:=select(type,indets(convert(sys_eqs2,list)),name);
notdrivers2:=symvarnames2 minus drivers2;


#Symbolic solve

sol2:=solve(sys_eqs2,notdrivers2) assuming real:
symb_sol2:=unapply(sol2,convert(drivers2,list)):


#Enumerate (there will generally be about 40, not 6)

count := 0;
for i1 from 1 to 40 do
     for i2 from 1 to 40 do
          for i3 from 1 to 40 do
               for i4 from 1 to 40 do
                    count := count + 1;
                    solsol2(count) := symb_sol2(i1,i2,i3,i4);
               od;
          od;
     od;
od;
count;



This works great!  I would like simliar output in my second code snippet, but this time with more inputs to symb_sol.  However, if I try and change the interconnection equations a little, and add a piecewise function, and another driver... (differences in bold)

#Interconnection Equations
eq1[1] := FD_T+EM2_T = 0;
eq1[2] := ICE_T+GBb_T = 0;
eq1[3] := GEN_T+GBa_T = 0;
eq1[4] := EM2_A+GEN_A+BAT_A = 0;
eq1[5] := -FD_W+EM2_W = 0;
eq1[6] := -GEN_W+GBa_W = 0;
eq1[7] := -ICE_W+GBb_W = 0;
eq1[8] := -EM2_V+GEN_V = 0;
eq1[9] := -EM2_V+BAT_V = 0;

#ICE
eq_c[1] := ICE_mdot_g=((671.5) + (-21.94)*ICE_T + (0.1942)*ICE_W + (0.5113)*ICE_T^2 + (-0.01271)*ICE_T*ICE_W + ( -0.0008761)*ICE_W^2 + (-0.006071)*ICE_T^3 + (9.867e-07)*ICE_T^2*ICE_W + (5.616e-05)*ICE_T*ICE_W^2 + (1.588e-06)*ICE_W^3 + (3.61e-05)*ICE_T^4 + (8.98e-07)*ICE_T^3*ICE_W + (-2.814e-07)*ICE_T^2*ICE_W^2 + (-8.121e-08)*ICE_T*ICE_W^3 + ( -8.494e-08 )*ICE_T^5 + (-2.444e-09)*ICE_T^4*ICE_W + (-9.311e-10)*ICE_T^3*ICE_W^2 + ( 5.835e-10)*ICE_T^2*ICE_W^3 ) *1/3600/1000 * ICE_T * ICE_W;

#BAT
eq_c[2] := BAT = 271;

#EM2
EM2_ReqPow_eq := (-148.3) + (4.267)*abs(EM2_W) + (12.77)*abs(EM2_T) + (-0.0364)*abs(EM2_W)^2 + ( 1.16)*abs(EM2_W)*abs(EM2_T) + (-0.258)*abs(EM2_T)^2 + ( 0.0001181)*abs(EM2_W)^3 + (-0.0005994)*abs(EM2_W)^2*abs(EM2_T) + ( 0.0001171)*abs(EM2_W)*abs(EM2_T)^2 + (0.001739 )*abs(EM2_T)^3 + (-1.245e-07 )*abs(EM2_W)^4 + ( 1.2e-06)*abs(EM2_W)^3*abs(EM2_T) + ( -1.584e-06)*abs(EM2_W)^2*abs(EM2_T)^2 + ( 4.383e-07)*abs(EM2_W)*abs(EM2_T)^3 + (-2.947e-06)*abs(EM2_T)^4;
eq_c[3] := EM2_P = piecewise( EM2_T = 0, 0, EM2_W = 0, 0, EM2_W*EM2_T < 0,-1 * EM2_ReqPow_eq, EM2_ReqPow_eq);
eq_c[4] := EM2_A = EM2_P/EM2_V;

#GEN
GEN_ReqPow_eq:= (-5.28e-12) + ( 3.849e-14)*abs(GEN_W) + (-71.9)*abs(GEN_T) + (-1.168e-16)*abs(GEN_W)^2 +(1.296)*abs(GEN_W)*abs(GEN_T) + (2.489)*abs(GEN_T)^2 + (1.451e-19)*abs(GEN_W)^3 + (0.0001326)*abs(GEN_W)^2*abs(GEN_T) + (-0.008141)*abs(GEN_W)*abs(GEN_T)^2 + (-0.004539)*abs(GEN_T)^3 +(-6.325e-23)*abs(GEN_W)^4 + (-2.091e-07)*abs(GEN_W)^3*abs(GEN_T) + ( 3.455e-06)*abs(GEN_W)^2*abs(GEN_T)^2 + ( 2.499e-05)*abs(GEN_W)*abs(GEN_T)^3 + (-5.321e-05)*abs(GEN_T)^4;
eq_c[5] := GEN_P = piecewise( GEN_T = 0, 0, GEN_W = 0, 0, GEN_W*GEN_T < 0,-1 * GEN_ReqPow_eq, GEN_ReqPow_eq);
eq_c[6] := GEN_A = GEN_P/GEN_V;

#GB
FiveSpeedGearbox_R := proc(ig)
local i ,eq;
i[1]:=3.32;
i[2]:=2;
i[3]:=1.36;
i[4]:=1.01;
i[5]:=0.82;
eq:= piecewise(ig=1,i[1],ig=2, i[2],ig=3,i[3],ig=4,i[4],ig=5,i[5],1);
return eq(ig);
end proc;


eq_c[7] := GBb_T = -1/GB_R * GBa_T;
eq_c[8] := GBb_W = GB_R * GBa_W;
eq_c[9] := GB_R = FiveSpeedGearbox_R(ig);

 

#System Equations
sys_eqs := convert(eq1,set) union convert(eq_c,set);

 

 #Solve for variables
symvarnames:=select(type,indets(convert(sys_eqs,list)),name);
drivers:= {ig, ICE_T,ICE_W,FD_T,FD_W};
not_drivers := symvarnames minus drivers;

#Assumptinons

assume(BAT_V::nonnegative);
assume(FD_W::nonnegative);

sol:=(solve(sys_eqs,not_drivers) assuming real);

symb_sol:=unapply(sol,convert(drivers,list)): ---> Error, (in unapply) variables must be unique and of type name

Subsequent parts don't work...

count := 0;
for i1 from 1 to 40 do
     for i2 from 1 to 40 do
          for i3 from 1 to 40 do
               for i4 from 1 to 40 do
                    for i5 from 1 to 40 do
                         count := count + 1;
                         solsol2(count) := symb_sol2(i1,i2,i3,i4,5);
                    od;
               od; 
          od;
     od;
od;
count;

While running the last line sol:, 1 of 2 things will happen, depending on the solver. Maple17 will take a long time (30+ minutes) to solve, then report nothing, or sol will solve, but will report "some solutions have been lost".

Afterwards, evaluating symb_sol(0,0,0,0,0) will return a viable solution (real values for each of the variables).  Whereas evaluating symb_sol(0,X,0,0,0), where X <> 0, will return and empty list [].

Does anyone know how to (i) speed up the symbolic solve time?  (ii) Return ALL of the solutions?

 

Thanks in advance for reading this.  I've really no idea why this isn't working.  I've also attached two worksheets with the code: noGB.mw   withGB.mw

 Adam

hi all.
i have a system of ODE's including 9 set of coupled OED's . 

i have  converted second deravaties to dd2 , in other words : diff(a[i](t),t,t)=dd2[i](t) . i =1..9 :

and i have set these 9 equations in form of vibrational equations such :  (M.V22)[i]+(K(t).V(t))[i]+P(t)[i] = eq[i] , where M is coefficient Matrix of second  derivatives , V22 is Vector of second derivaties , for example V22[1] = diff(a[1](t),t,t) , and  P(t) is the numeric part of equations ( they are pure number and do not contain any symbolic function ) and K(t).V(t) is the remaining part of equations such that : (K(t).V(t))[i] = eq[i] - (M.V22)[i] - P(t)[i]  , and V(t) are vector of a[i](t)'s which V(t)[1] = a[1](t) ,

i have used step by step time integration method (of an ebook which i have attachted that part of ebook here), when i set time step of solving process to h=0.01 , i can solve this system up to time one second or more, but when i choose h=0.001 or smaller, the answer diverges after 350 steps . i do not know whether the problem is in my ODS system, or maple can not handle this ?the answer about the time t=0.3 are the same in both steps, but after that, the one with stpe time h=0.001 diverges. my friend has solved this in mathematica without any problem, could any body help me ?! it is urgent for me to solve this problem,thnx everybody.


ebook.pdf  step_=_0.001.mw  step_=_0.01.mw 

Dear all;

Please Have some one an idea to transform or convert 2nd order ODE to system of First ODE ( of course using maple).

Thanks

 

Hi there,

I'm quite new to Maple so please forgive me! I have a system of partial differential equations I'm trying to solve in Maple as such below 

 

df/dt = f(1-f) - f * h

dg/dt = g(1-g) * Gradient(1-f * gradient(g))

dh/dt = (g - h) + Laplacian(h),

where f,g,h are functions of space and time (i.e. f(x,y,z,t)). I guess my first question is - is this possible in Maple to evaluate? (I'm currently unsure on ICs as I'm figuring it out from the model - it's a model for cancer growth I'm trying to evaluate but have a rough idea of what I'd use).

If it is possible, can you please share how I'd write this? Everytime I've tried I seem to be failing to define anything properly, so your expertise would be greatly appreciated!

i have got alot of mixed and high degree derivatives. For example:

u[x]*u[x,t]*eta[x,t]+u[]^2*u[x]*eta[x]+kis(x,y)u[x,t]^2*u[]+eta(x, y)*u[]*u[x]^2+ksi[x,t]*u[x]^2*u[x,t]+......

like this alot of terms

my question is how can i solve divided by the derivative of the u(x,t) partial differential equations system and so  how can i find eta(x,t,u) and ksi(x,t,u) 

Hi all

I have following program to solve time delay system...

the solution is good by choosing r:=11... but for r greater than 11(e.g r=20) the system take about4-5 minute to do and then it says:"" K2:=simplify(inverse(K1)):Error, (in minor) object too large""
and for plotting says:""     Warning, unable to evaluate 1 of the 2 functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct""

i don't know what is the problem?

any one can help me???

best wishes

 

> restart:
> with(plots):
> with(linalg):
> with(LinearAlgebra):
> L:=1:
> r:=20:
> tau:=0.3:
> #definition of exact solution
>
> T1 := piecewise(t<0,0,t>=0 and t<0.3,1+t^2,t>=0.3 and t<0.6,(691/1000)+(109/100)*t+(7/10)*t^2+(1/3)*t^3,0.6<=t and t<0.9,(4409/5000)+(209/500)*t+(69/50)*t^2+(2/15)*t^3+(1/12)*t^4,0.9<=t and t<1,(1500917/2000000)+(35107/40000)*t+(1617/2000)*t^2+(87/200)*t^3+(1/120)*t^4+(1/60)*t^5):
> plot(T1,t=0..1,numpoints=10000,discont = true):
> g:=t^2:
> a[0]:=evalf((1/L)*Int(g,t=0..L)):
> for i1 from 1 to r do
> a[i1]:=evalf((2/L)*Int(g*cos(2*i1*Pi*t/L),t=0..L)):
> od:
> for j1 from 1 to r do
> b[j1]:=evalf((2/L)*Int(g*sin(2*j1*Pi*t/L),t=0..L)):
> od:
> X00:=matrix([[a[0]]]);
> X10:=matrix(1,r,0):
> for j from 1 to r do
> X10[1,j]:=a[j]:
> od:
>
> X20:=matrix(1,r,0):
> for j from 1 to r do
> X20[1,j]:=b[j]:
> od:

X00 := [0.3333333333]

> X00:=blockmatrix(1,3,[X00,X10,X20]):
>
>
>
> Z:=linalg[matrix](2*r+1,2*r+1):
> Z[1,1]:=tau:
> for iz from 2 to r+1 do
> Z[iz,1]:=(L/(2*(iz-1)*Pi))*sin(2*(iz-1)*Pi*tau/L):
> od:
> for iz from r+2 to 2*r+1 do
> Z[iz,1]:=(L/(2*(iz-1-r)*Pi))*(1-cos(2*(iz-1-r)*Pi*tau/L)):
> od:
> for jz from 2 to 2*r+1 do
> for iz from 1 to 2*r+1 do
> Z[iz,jz]:=0;
> od:
> od: 
> Dtau00:=matrix([[1]]):
> Dtau01:=matrix(1,r,0):
> Dtau02:=matrix(1,r,0):
> Dtau10:=matrix(r,1,0):
> Dtau20:=matrix(r,1,0):
>
> Dtau1:=linalg[matrix](r,r):
> for i from 1 to r do
> for j from 1 to r do
> Dtau1[i,i]:=cos(2*(i)*Pi*tau/L):
> if i<>j then Dtau1[i,j]:=0 fi:
> od:
> od:
>
> Dtau2:=linalg[matrix](r,r):
> for i from 1 to r do
> for j from 1 to r do
> Dtau2[i,i]:=sin(2*(i)*Pi*tau/L):
> if i<>j then Dtau2[i,j]:=0 fi:
> od:
> od:
>
> Dtau3:=linalg[matrix](r,r):
> for i from 1 to r do
> for j from 1 to r do
> Dtau3[i,i]:=-sin(2*(i)*Pi*tau/L):
> if i<>j then Dtau3[i,j]:=0 fi:
> od:
> od:
>
> Dtau4:=linalg[matrix](r,r):
> for i from 1 to r do
> for j from 1 to r do
> Dtau4[i,i]:=cos(2*(i)*Pi*tau/L):
> if i<>j then Dtau4[i,j]:=0 fi:
> od:
> od:
>
> Dtau:=blockmatrix(3,3,[Dtau00,Dtau01,Dtau02,Dtau10,Dtau1,Dtau2,Dtau20,Dtau3,Dtau4]):
>
> P00:=matrix([[L/2]]):
> P01:=matrix(1,r,0):
>
> P02:=matrix(1,r,0):
> for j from 1 to r do
> P02[1,j]:=-L/(j*Pi):
> od:
>
> P10:=matrix(r,1,0):
>
> P20:=matrix(r,1,0):
> for i from 1 to r do
> P20[i,1]:=L/(2*i*Pi):
> od:
>
>
> P1:=linalg[matrix](r,r):
> for i from 1 to r do
> for j from 1 to r do
> P1[i,j]:=0
> od;
> od;
> P2:=linalg[matrix](r,r):
> for i from 1 to r do
> for j from 1 to r do
> P2[i,i]:=L/(2*i*Pi):
> if i<>j then P2[i,j]:=0 fi:
> od:
> od:
>
> P3:=linalg[matrix](r,r):
> for i from 1 to r do
> for j from 1 to r do
> P3[i,i]:=-L/(2*i*Pi):
> if i<>j then P3[i,j]:=0 fi:
> od:
> od:
>
> P4:=linalg[matrix](r,r):
> for i from 1 to r do
> for j from 1 to r do
> P4[i,j]:=0:
> od:
> od:
>
> P:=blockmatrix(3,3,[P00,P01,P02,P10,P1,P2,P20,P3,P4]):
> I1:=Matrix(2*r+1,shape=identity):
> K1:=simplify(evalm(I1-Dtau&*P+Dtau&*Z)):
> K2:=simplify(inverse(K1)):
Error, (in minor) object too large

>
> X0:=matrix(1,2*r+1,0):
> X0[1,1]:=1:
> for j from 2 to 2*r+1 do
> X0[1,j]:=0:
> od:
>
> X:=simplify(evalm(evalm((X0+X00))&*K2)):
>
> for h from 1 to r do
> f1(h):=cos(2*h*Pi*t/L):
> od:

> for k from 1 to r do
> f2(k):=sin(2*k*Pi*t/L):
> od:
> XP:=X[1,1]+evalf(sum(X[1,l+1]*f1(l)+X[1,r+l+1]*f2(l),l=1..r )):
> plot({XP,T1},t=0..1);
Warning, unable to evaluate 1 of the 2 functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

1 2 3 4 5 6 7 Last Page 1 of 11