MaplePrimes Questions

Dear Users

I have a problem for solving a system of linear equations that arise from collocation method for getting approximate solution of a coupled PDE and ODE in Food engineering problems.

When it reach to the fsolve command it takes long time!!!

I used maple 13.

If kindly is possible, please help me in this special case.

With kind regards,

Emran Tohidi.

 

> Restart;
print(`output redirected...`); # input placeholder
> h := 50; hm := 0.1e-3; rhodp := 1500; Y := 0.5e-1; T0 := 20; rhoair := 1.2041; Dair := 0.2e-8; DD := 0.85e-9; C := 3240; L := 0.4e-1; X0 := 1.5; V := .2; delta := 0.2e-2; Yair := 0.5e-1; nu := .2; Tair := 60; Hnu := 2400; rho := 1359; tt := 3;
%;
> N := 5; Digits := 20;
> X := sum(sum(a[m, n]*z^m*t^n, m = 0 .. N), n = 0 .. N); X := unapply(X, z, t); Xt := diff(X(z, t), `$`(t, 1)); Xt := unapply(Xt, z, t); Xz := diff(X(z, t), `$`(z, 1)); Xz := unapply(Xz, z, t); Xzz := diff(X(z, t), `$`(z, 2)); Xzz := unapply(Xzz, z, t); T := sum(b[n]*t^n, n = 0 .. (N+1)^2-1); T := unapply(T, t); Tt := diff(T(t), `$`(t, 1)); Tt := unapply(Tt, t); aw := exp(.914)*X(z, t)^.5639-.5*exp(1.828)*X(z, t)^(2*.5639); aw := unapply(aw, z, t); TT := 8.3036+3816.44*(1+T(t)/(46.13)+T(t)^2/46.13^2)/(46.13); TT := unapply(TT, t); pwv := 133.3*(1+TT(t)+(1/2)*TT(t)^2); pwv := unapply(pwv, t); Yi := .622*pwv(t)*aw(z, t)*(1+pwv(t)*aw(z, t)/rho+(pwv(t)*aw(z, t)/rho)^2)/rho; Yi := unapply(Yi, z, t);
%;
> S1 := {seq(seq(Xt(delta*i/N, tt*j/N)-DD*Xzz(delta*i/N, tt*j/N) = 0, i = 1 .. N-1), j = 1 .. N)};
> S2 := {seq(DD*rhodp*Xz(delta, tt*j/N)+hm*rhoair*Yi(delta, tt*j/N) = 0, j = 0 .. N)};
> S3 := {seq(Xz(0, tt*j/N) = 0, j = 0 .. N)};
> S4 := {seq(X(delta*i/N, 0) = 0, i = 1 .. N-1)};
> S5 := {seq(seq(rho*delta*C*Tt(tt*j/N)-h*(Tair-T(tt*j/N))+hm*Hnu*rhoair*(Yair-Yi(delta*i/N, tt*j/N)) = 0, j = 1 .. N), i = 0 .. N)};
print(`output redirected...`); # input placeholder
> S6 := {seq(rho*delta*C*Tt(0)-h*(Tair-T0)+hm*Hnu*rhoair*(Yair-Yi(delta*i/N, 0)) = 0, i = 0 .. N)};
%;
> SS := `union`(`union`(`union`(`union`(`union`(S1, S2), S3), S4), S5), S6);
> sol := fsolve(SS);

Hello, I have two plots:

Is it possible to display differene between these plots?

Bonjour,

Comment résoudre le système algébrique suivant :

f1:=(1+mu+nu)*(mu^2-2*mu*alpha+2*mu+2*mu*alpha*nu-2*alpha+1+alpha^2+2*alpha^2*nu+nu^2*alpha^2-2*nu*alpha)*(lambda*alpha^2-3*mu*alpha*nu^2+2*nu^2*mu-4*lambda*alpha*nu-mu^2*alpha*nu^2-lambda*alpha^3-nu*alpha+lambda*alpha-4*mu*alpha*nu+3*mu^2*nu-2*mu^3*alpha*nu+3*mu*nu-5*mu^2*alpha*nu+3*lambda*nu+mu^3*nu+3*nu^2*alpha^3*mu-5*lambda*mu^2*alpha*nu+3*lambda*alpha^3*mu-9*lambda*alpha*mu*nu+6*lambda*mu*nu+3*lambda*mu^2*nu-lambda+nu^2+nu+nu^3*alpha^3*mu-3*mu^2*alpha^2*nu-5*nu^2*alpha^2*mu-4*mu*alpha^2*nu-3*lambda*alpha^3*nu^2-3*lambda*alpha^3*nu-3*lambda*mu^2-nu^3*alpha+nu^2*mu^2+3*mu*alpha^3*nu+5*lambda*mu^2*alpha-5*lambda*mu^2*alpha^2+2*mu^2*alpha^3*nu-3*lambda*mu+mu^2*alpha^3*nu^2+alpha^3*mu+alpha^3*mu^2+3*lambda*alpha^3*nu^2*mu+6*lambda*alpha^3*mu*nu+5*lambda*alpha*nu^2*mu-9*lambda*alpha^2*mu*nu+5*lambda*mu^2*alpha^2*nu-5*lambda*alpha*nu^2-4*lambda*alpha^2*mu+mu*alpha*nu^3-2*nu^2*alpha+mu^3*alpha^2*nu-lambda*mu^3-mu^2*alpha^2*nu^2-lambda*alpha^3*nu^3-5*lambda*alpha^2*mu*nu^2+4*alpha^2*nu*lambda+5*lambda*alpha^2*nu^2+2*lambda*alpha^2*nu^3-2*nu^3*alpha^2*mu+2*lambda*mu^3*alpha-mu*alpha^2-2*mu^2*alpha^2-mu^3*alpha^2+4*lambda*mu*alpha);

f2:=(lambda+mu+nu)*(nu^2+2*mu*alpha*nu+mu^2*alpha^2+2*lambda*nu-2*lambda*alpha*nu-2*lambda*mu*alpha+2*lambda*alpha^2*mu+lambda^2*alpha^2-2*lambda^2*alpha+lambda^2)*(lambda^3*alpha^3*nu-5*mu*alpha*nu^2+3*nu^2*mu-mu^2*alpha*nu^2+lambda^3*mu-3*lambda*nu^2+mu^3*alpha*nu+5*mu^2*alpha*nu-3*lambda*mu^2*alpha*nu+lambda^2*mu^2-nu^3+mu*nu^3-3*lambda*alpha^3*mu^2-3*lambda^2*nu-9*lambda*alpha*mu*nu-lambda^3+6*lambda*mu*nu+2*lambda*mu^2*nu+3*lambda^2*mu-3*lambda^2*alpha^3*mu-5*mu^2*alpha^2*nu+5*nu^2*alpha^2*mu+mu^3*alpha^3*nu+3*lambda*nu^2*mu+2*nu^3*alpha+nu^2*mu^2-mu^3*alpha^3-5*lambda*mu^2*alpha+5*lambda*mu^2*alpha^2+3*lambda^2*nu*mu+3*mu^2*alpha^3*nu+mu^2*alpha^3*nu^2+2*lambda*alpha^3*nu^2*mu+6*lambda*alpha^3*mu*nu+3*lambda*alpha^3*mu^2*nu-5*lambda*alpha*nu^2*mu-9*lambda*alpha^2*mu*nu-5*lambda*mu^2*alpha^2*nu+5*lambda*alpha*nu^2-lambda^3*alpha*mu-4*lambda^2*alpha^2*nu-2*mu*alpha*nu^3+3*lambda^2*alpha^3*mu*nu-2*lambda^2*alpha*mu^2-4*lambda^2*alpha*mu-2*mu^3*alpha^2*nu-mu^2*alpha^2*nu^2+3*lambda^2*alpha^3*nu+lambda^2*alpha^3*nu^2-3*lambda*alpha^2*mu*nu^2+lambda^3*alpha^2+lambda^3*alpha-4*lambda^2*alpha^2*mu*nu-4*lambda^2*alpha*nu*mu-5*lambda*alpha^2*nu^2+4*lambda^2*alpha*nu-lambda*alpha^2*nu^3+nu^3*alpha^2*mu-lambda*mu^3*alpha-lambda^3*alpha^3+2*mu^3*alpha^2+4*lambda^2*alpha^2*mu-lambda^3*alpha^2*nu-2*lambda^2*alpha^2*nu^2);

f3:=(1+nu+lambda)*(nu^2*alpha^2-2*nu^2*alpha+nu^2-2*lambda*alpha*nu+2*lambda*nu-2*nu*alpha+2*alpha^2*nu+lambda^2+2*lambda*alpha+alpha^2)*(2*lambda*alpha^2+4*mu*alpha*nu^2-3*nu^2*mu+3*lambda*alpha*nu-lambda*alpha^3+lambda^3*mu+nu*alpha-3*lambda*nu^2-lambda*alpha+5*mu*alpha*nu-2*lambda*nu+3*nu^2*alpha^3*mu-nu^3+mu*nu^3-3*lambda*alpha^3*mu-3*lambda^2*nu+9*lambda*alpha*mu*nu-lambda^3-6*lambda*mu*nu-3*lambda^2*mu-nu^2+nu^3*alpha^3*mu-4*nu^2*alpha^2*mu-5*mu*alpha^2*nu-3*lambda*alpha^3*nu^2-3*lambda*alpha^3*nu+3*lambda*nu^2*mu+nu^3*alpha-lambda^2+3*mu*alpha^3*nu+3*lambda^2*nu*mu+alpha^3*mu-3*lambda*alpha^3*nu^2*mu-6*lambda*alpha^3*mu*nu-4*lambda*alpha*nu^2*mu+9*lambda*alpha^2*mu*nu+4*lambda*alpha*nu^2-2*lambda^3*alpha*mu+3*lambda^2*alpha^2*nu+5*lambda*alpha^2*mu-mu*alpha*nu^3+5*lambda^2*alpha*mu-lambda^2*alpha^3+2*nu^2*alpha+lambda^2*alpha^2-2*lambda^2*alpha^3*nu-lambda^2*alpha^3*nu^2-lambda*alpha^3*nu^3+4*lambda*alpha^2*mu*nu^2-lambda^3*alpha^2+2*lambda^3*alpha+5*alpha^2*nu*lambda+5*lambda^2*alpha^2*mu*nu-5*lambda^2*alpha*nu*mu+lambda^2*alpha+4*lambda*alpha^2*nu^2+5*lambda^2*alpha*nu+lambda*alpha^2*nu^3-nu^3*alpha^2*mu-2*mu*alpha^2-5*lambda^2*alpha^2*mu+lambda^3*alpha^2*nu+2*lambda^2*alpha^2*nu^2-5*lambda*mu*alpha);

f4:=(1+mu+lambda)*(mu^2*alpha^2-2*mu^2*alpha+mu^2-2*lambda*mu*alpha+2*mu+2*lambda*alpha^2*mu-2*mu*alpha+lambda^2*alpha^2+2*lambda*alpha+1)*(lambda^3*alpha^3*nu-lambda*alpha^2+5*lambda*alpha*nu-2*nu*alpha+2*lambda*alpha-5*mu*alpha*nu+3*mu^2*nu-mu^3*alpha*nu+3*mu*nu-4*mu^2*alpha*nu-3*lambda*nu+mu^3*nu+4*lambda*mu^2*alpha*nu-lambda^2*mu^2-3*lambda*alpha^3*mu^2-2*lambda*alpha^3*mu+9*lambda*alpha*mu*nu-6*lambda*mu*nu-3*lambda*mu^2*nu-2*lambda^2*mu-lambda+nu-3*lambda^2*alpha^3*mu+4*mu^2*alpha^2*nu+5*mu*alpha^2*nu+mu^3*alpha^3*nu-3*lambda*mu^2-lambda^2-mu^3*alpha^3+4*lambda*mu^2*alpha+4*lambda*mu^2*alpha^2-3*mu^2*alpha^3*nu-3*lambda*mu-alpha^3*mu^2-6*lambda*alpha^3*mu*nu+3*lambda*alpha^3*mu^2*nu+9*lambda*alpha^2*mu*nu-4*lambda*mu^2*alpha^2*nu+lambda^3*alpha*mu+5*lambda^2*alpha^2*nu+3*lambda*alpha^2*mu+3*lambda^2*alpha^3*mu*nu+2*lambda^2*alpha*mu^2+3*lambda^2*alpha*mu-lambda^2*alpha^3-mu^3*alpha^2*nu-lambda*mu^3+lambda^2*alpha^2-3*lambda^2*alpha^3*nu+2*lambda^3*alpha^2-lambda^3*alpha-5*alpha^2*nu*lambda-5*lambda^2*alpha^2*mu*nu+5*lambda^2*alpha*nu*mu+lambda^2*alpha-5*lambda^2*alpha*nu+lambda*mu^3*alpha-lambda^3*alpha^3+mu*alpha^2+2*mu^2*alpha^2+mu^3*alpha^2+5*lambda^2*alpha^2*mu-2*lambda^3*alpha^2*nu+5*lambda*mu*alpha);

 

Merci d'avance,

Gérard.

 

 

I don't understand how to create better parameters. Why is the graph not flush with the image (it appears that the graph is a set of points and NOT lines)

 

From the manual: coeffs - extract all coefficients of a multivariate polynomial. Is there a way of doing the reverse (giving the coefficients, obtain the multivariate polynomial) ? For univariate polynomials I know that the answer is yes because  PolynomialTools[FromCoefficientList] - return a univariate polynomial from list of coefficients. But what about multivariate polynomials?

ACP.mw

 

hi all

trying to modify some kitonum code to get the smallest solution, d=3,515,820, but i have problem....

http://en.wikipedia.org/wiki/Archimedes'_cattle_problem

 

Hello,
I'm working on coupled differential equation.
The first system is : 
y1''+y1'+y1=q1
q1''+e(q12-1)q1'+q1=y1"

And the second one : 
y2''+y2'+y2=q2
q2''(t)+e(q22-1)q2'(t)+q2(t) = y2"+f(P) q1(t-tau)

This is a parametric system, f(P) and tau(P) are given function of the parameters P.
e is a constant

I have solved the first system with dsolve (using numeric option).
But when I try to solve the second one (with dsolve, numeric, setting P as a parameter), maple returns an error : 

"Error, (in dsolve/numeric/process_input) input system must be an ODE system, got independent variables {t, t-1}"

I think Maple doesn't like " q1(t-tau)".
I have tried to create a new function q where :
q(t)=q1(t-tau)
But Maple returns the same error.

How can I fix it ?

Thanks for reading

EDIT : I have read there is no function in maple that solve delay differential equation.
But this is not a true DDE because q2 has no effect on q1
So I hope there is a way to "fool" maple and still use dsolve.

EDIT 2 :
I have found how to make it works.
I was using dsolve with the option compile (which increase (a lot) the efficiency of computation).
I delete this option and that's working.
Nevertheless, without the option compile, the computation is very very slow.
MapleHelp recommands to combine the 2 systems for more efficiency. But, when I combine, maple return the previous error.
How can I make it quicker ?

Here is the code : 

test_2_cylindre_sans_compile.mw 

hello,

i have unistalled maple, now i have to give the license server name and the purchase code to reactivate it, how can i do?? where i can find them?

someone can help me?!

hello guys

i have a 2-sphere metric (ds^2=dθ^2+sinθ^2 dφ^2) , how to calculate R^abcd R_abcd . 

 

thank you very much

Hi dear users:

i will plot the equation below abs(y) in terms of x,(note:abs(y) and x is real values),can every body help me?

eq:

-32.46753247/(Pi*x^2)+1.053598444*10^8*Pi^2*y/x^2-5.342210338*10^14*Pi^2*y*(2.574000000*10^8*Pi^2-.7700000000*x^2)/((-3.904240733*10^6*x^2+1.305131902*10^15*Pi^2-159.8797200*Pi^2*x^2+2.672275320*10^10*Pi^4+2.391363333*10^(-7)*x^4)*x^2)+1.504285714*10^9*Pi^4*y^3/x^2 = y


Say I have some function that cannot be changed and it returns this:

all_plots:=display([plot(sin(10*x+0.2),x=0..1, thickness=10, color=blue), plot(1-sin(10*x),x=0..1, thickness=10, color=red), plot(sin(10*x),x=0..1, thickness=10, color=green)]):


Now can plot it as:
plots:-display( all_plots );


...but what if I need the (say) red curve to be "on top" (fully visible), green curve in the middle, and blue curve at the bottom (as is now).

what is the most effective way to do this?

EDIT:

i guess this works:

display([convert(all_plots, list)[1], convert(all_plots, list)[3],  convert(all_plots, list)[2]]);

EDIT 2:

... lookst like above doesn't keep all the extra options that a plot can have... here is a version that seems to do it.

rearrangeCurves:=proc(v_items, v_reorder:=[])
  #Reorder should be a list of index pairs like
  #[[3,5], [-1, 1], ...]
  local p, temp, curves:=[], rest:=[]:
  #separate curves from rest (there must be a prettier way to do this)
  for p in convert(v_items, list) do
    if type(p,'function') and op(0,p) = ('CURVES') then 
      curves:=[curves[], p]:
    else
      rest:=[rest[], p]:
    end;
  end;
  #now reorder
  for p in v_reorder do
    temp:=curves[p[1]]:
    curves[p[1]]:=curves[p[2]]:
    curves[p[2]]:=temp:
  end;
  PLOT(curves[], rest[]):
end:

#change say second last with last curve:

rearrangeCurves(all_plots, [[-2, -1]]);

 

Hello,

 

  I have a question. Consider

 

fsolve(x^2+3*x+1=3, x);

 

  I want to save the two roots into two variables. What kind of commend shall I use? 

 

P.S. My further aim comes from solving an equation without analytical solution. Therefore I cannot plug in the solution formula. 

 

 

restart;
Eq1 := diff(T1(t), t) = (W*Cp*(To-T1(t))+UA*(Ts-T1(t)))/(M*Cp);
Eq2 := diff(T2(t), t) = (W*Cp*(T1(t)-T2(t))+UA*(Ts-T2(t)))/(M*Cp);
Eq3 := diff(T3(t), t) = (W*Cp*(T2(t)-T3(t))+UA*(Ts-T3(t)))/(M*Cp);
sys := Eq1, Eq2, Eq3;

Operational Veriables

W := 100;
UA := 10;
Cp := 2;
M := 1000;
To := 20;
Ts := 250;

Initial Conditions

sys1 := {Eq1, Eq2, Eq3};

nsys := nops(sys1);

ics := {T1(0) = 20, T2(0) = 20, T3(0) = 20};
{T1(0) = 20, T2(0) = 20, T3(0) = 20}
nics := nops(ics);
for i from 1 to nics do Sol ||i:=dsolve({sys1, ics[i]},{T1(t),T2(t),T3(t)},numeric)od;
Error, unable to match delimiters
Typesetting:-mambiguous(Typesetting:-mambiguous( for i from 1 to

nics do Sol verbarverbariAssigndsolvelpar(sys1comma ics(i))

commalcubT1(t)commaT2(t)commaT3(t)rcubcommanumericrparod,

Typesetting:-merror("unable to match delimiters")))

 

help evaluate the integral int(1/(-98*x+75*x*ln(1+2*x),x)

I am trying to solve an RLC circuit that uses sinusoidal wave generated voltage supply and I do not understand how to use a complex Matrices. Normally the Matrices of Constant coefflcients is one of a Real Number valued Matrix, but the Phase on the RLC circuit uses a Complex variable, and the elements of the Matrix cannot by combined as real number values because the current in the Mesh Current Method for RLC Sinusoidal Phase Circuit Analysis uses a Vector as the answer for the current...

My Question is How do I set up a Complex Matrix and solve for the determinant?

First 1428 1429 1430 1431 1432 1433 1434 Last Page 1430 of 2434