Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Dear Friends

I have a problem in CPU time in MAPLE.

I write the codes in maple related to the nonlinear heat conduction problem in one dimension by Collocation method, but after 30 minutes no solution has been observed!!!

My codes are for N=4!, i.e., I have 25 equations with 25 unknowns!!!

If MAPLE can not solve this simple system, How can I solve 3 dimensional pdes by N=9,

In this case, I have 1000 equations with 1000 unknowns!!!

please help me and suggest me a fast iterative solver.

I should remark that my problem is stated in this paper

http://www.sciencedirect.com/science/article/pii/S1018364713000025

If there exist any other suitable method, I will be happy to receive any support.

 

With kind regards,

Emran Tohidi.

 

> restart;
> Digits := 20; N := 4; st := time(); u := sum(sum(a[m, n]*x^m*t^n, m = 0 .. N), n = 0 .. N); u := unapply(u, x, t); ut := diff(u(x, t), `$`(t, 1)); ut := unapply(ut, x, t); ku := simplify(1+u(x, t)^2); ku := unapply(ku, x, t); ux := diff(u(x, t), `$`(x, 1)); ux := unapply(ux, x, t); K := ku(x, t)*ux(x, t); K := unapply(K, x, t); Kx := diff(K(x, t), `$`(x, 1)); Kx := unapply(Kx, x, t); f := proc (x, t) options operator, arrow; x*exp(t)*(1-2*exp(2*t)) end proc;
print(`output redirected...`); # input placeholder
> S1 := {seq(u(i/N, 0)-i/N = 0, i = 0 .. N)}; S2 := {seq(u(0, j/N) = 0, j = 1 .. N)}; S3 := {seq(u(1, j/N)+ux(1, j/N)-2*exp(j/N) = 0, j = 1 .. N)}; S4 := {seq(seq(Kx(i/N, j/N)+f(i/N, j/N)-ut(i/N, j/N) = 0, i = 1 .. N-1), j = 1 .. N)}; S := `union`(`union`(`union`(S1, S2), S3), S4); sol := DirectSearch:-SolveEquations([op(S)], tolerances = 10^(-4), evaluationlimit = 1000000);
print(`output redirected...`); # input placeholder
> assign(sol);
%;
> u(x, t);
> CPUTIME := time()-st;
plot3d(u(x, t) - x exp(t), x = 0 .. 1, t = 0 .. 1)

Hello,

I just bought and installed "The mathematical Survival Kit" but I can't figure out how does it work

Anybody can help?

 

Thanaks

Martina

 

 

restart;

with(combinat):

symMonomial := proc(test)

h := 0;

for i from 1 to nops(test) do

                h[i] := choose(test,i);

od;

 

c := copy(test);

k := 0;

for k from 1 to nops(test) do

                c[k] := 0;

                for i from 1 to nops(h[k]) do

                                ki := 1;

                                for j from 1 to nops(h[k][i]) do

                                                ki := ki*h[k][i,j];

                                od;

                                c[k] := c[k] + ki;

                od;

od;

return c;

end proc;

 

 

sympoly := proc(test, number_of_roots)

with(combinat):

h := 0;

for i from 1 to nops(test) do

                h[i] := choose(z,i);

od;

 

c := 0;

for k from 1 to nops(test) do

                c[k] := 0;

                for i from 1 to nops(h[k]) do

                                ki := 1;

                                for j from 1 to nops(h[k][i]) do

                                                ki := ki*h[k][i,j];

                                od;

                                c[k] := c[k] + ki;

                od;

od;

poly := x^number_of_roots;

for k from 1 to number_of_roots do

                poly := poly + c[k]*x^(number_of_roots-k);

od;

end proc;

 

z := [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10];

sigma := symMonomial(z);

f := expand(sigma[1]*sigma[2]);

f := expand(sigma[1]*sigma[1]); # two lambda value are the same

f := expand(sigma[1]*sigma[1]*sigma[1]); # three lambda value are the same

 

f := expand(sigma[1]^2+2*sigma[1]*sigma[2]+sigma[2]);

f := subs(x1=3, f);

f := subs(x2=2, f);

f := subs(x3=3, f);

f := subs(x4=4, f);

f := subs(x5=5, f);

f := subs(x6=6, f);

f := subs(x7=7, f);

f := subs(x8=8, f);

f := subs(x9=9, f);

f := subs(x10=lambda, f);

evalf(solve(f, lambda));

if degree(f) = 2 then

                f := f + lambda^3;

                evalf(solve(f, lambda));

end if:

 

how to convert above f back to matrix form such as

 

m := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);

m-Matrix([[lambda,0,0],[0,lambda,0],[0,0,lambda]]);

m2 := Determinant(m-Matrix([[lambda,0,0],[0,lambda,0],[0,0,lambda]]));

 

after tested m2 can not be expressed in terms of shell like polynomial,

it seems that it is from symmetric polynomial and it is from a non-homogenous polynomial which homogenize with a lambda

 

if solve f for new eigenvalue,

can traditional eignvector method calculate new eigenvector for these new kind of eigenvalues method?

A*x = lambda*x

in maple 15

https://drive.google.com/file/d/0B8F2D27rfQWgVXE1alN0V3JWU1U/edit?usp=sharing

there are 3 equation to be minimized

and i limit x between x + 5 and x - 5 as constraints

 

though f1 got a error in first line of command,

later i type a correct command for f1 in later part of script

What is the command to get a sequence of the first twenty prime numbers

I have some data for a model in MapleSim that I would like to use a time look up table with.  I've found that the two options for interpolation are linear and 1st derivative, but the data was intended to be interpretted as piecewise constant.  Is there any way to acheive this option in MapleSim?

Code was computed on two different PC:
1) Win 8.1, Maple 17.02 x64
2) Win 8.1, Maple 18.01 x64

In brief:

n:=3: 
Grid:-Seq('f(i)', i = 1 .. n):

works well in Maple 17.02 but gives an error in Maple 18.01. Why?

However,

(j -> Grid:-Seq('f(i)', i = 1 .. j))(n):

works well for both Maple versions.

according to examples from Maple help page
http://www.maplesoft.com/support/help/Maple/view.aspx?path=Grid%2fSeq
we have to pass exactly 'f(i)' (not just f(i)) into Grid:-Seq(...). Why?

Why doesn't Digits:=30: work properly for Grid:-Seq(...)?

For details see attached file. Output was produced in Maple 17.02. In Maple 18.01 the output will differ.


restart; n := 3; f1 := proc (i) options operator, arrow; evalf(sqrt(i)) end proc; f2 := proc (i) options operator, arrow; evalf(sqrt(i+1)) end proc; f3 := proc (i) options operator, arrow; evalf(i*Pi) end proc; g1 := proc (f, n) local za, zb, zc, str; str := sprintf("g1(%a,n)", f); za := seq(f(i), i = 1 .. n); zb := Grid:-Seq(f(i), i = 1 .. n); zc := (proc (j) options operator, arrow; Grid:-Seq(f(i), i = 1 .. j) end proc)(n); print("------------------------------"); print(cat("(a):   ", str), za); print(cat("(b):   ", str), zb); print(cat("(c):   ", str), zc); print("------------------------------") end proc; g2 := proc (f, n) local za, zb, zc, str; str := sprintf("g2(%a,n)", f); za := seq('f(i)', i = 1 .. n); zb := Grid:-Seq('f(i)', i = 1 .. n); zc := (proc (j) options operator, arrow; Grid:-Seq('f(i)', i = 1 .. j) end proc)(n); print("------------------------------"); print(cat("(a):   ", str), za); print(cat("(b):   ", str), zb); print(cat("(c):   ", str), zc); print("------------------------------") end proc

3

(1)

g1(f1, n);

"------------------------------"

 

"(a):   g1(f1,n)", 1., 1.414213562, 1.732050808

 

"(b):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"(c):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f2,n)", 1.414213562, 1.732050808, 2.

 

"(b):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"(c):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(b):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

 

"+++++++++++++++++++++++++++++++++++++++++++"

 

"------------------------------"

 

"(a):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(b):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(c):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(b):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(c):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(b):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

(2)

Digits := 30;

30

 

"------------------------------"

 

"(a):   g1(f1,n)", 1., 1.41421356237309504880168872421, 1.73205080756887729352744634151

 

"(b):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"(c):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f2,n)", 1.41421356237309504880168872421, 1.73205080756887729352744634151, 2.

 

"(b):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"(c):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f3,n)", 3.14159265358979323846264338328, 6.28318530717958647692528676656, 9.42477796076937971538793014984

 

"(b):   g1(f3,n)", 3.14159265358979323846264338328, 6.283185308, 9.424777962

 

"(c):   g1(f3,n)", 3.14159265358979323846264338328, 6.283185308, 9.424777962

 

"------------------------------"

 

"+++++++++++++++++++++++++++++++++++++++++++"

 

"------------------------------"

 

"(a):   g2(f1,n)", 1., 1.41421356237309504880168872421, 1.73205080756887729352744634151

 

"(b):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(c):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f2,n)", 1.41421356237309504880168872421, 1.73205080756887729352744634151, 2.

 

"(b):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(c):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f3,n)", 3.14159265358979323846264338328, 6.28318530717958647692528676656, 9.42477796076937971538793014984

 

"(b):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

(3)

``

NULL


Download Grid[Seq].mw

i am trying to export an animated gif file but the export windows freezes and exports an empty file with zero bytes

the animation was created by: display(map(p, convert(A(() .. (), 2), list)), insequence = true)

i have tried to give maple some time (2-3 hours) and i even tried to restart the computer and lauch maple and try to export it but it didnt worked

how can i export it or how can i plot the using commands

 

 

Greetings everyone. I tried to get the roots of this polynomial by using allvalues command. But I got the roots in indeces instead of the value of the roots.

what should i do?

matlab has break point in loops which in extremely useful tool for finding errors in long term loops,whay maple does not has sth similiar !?

How to identify whether biased game is changed based on the latest toss from a sequence

can HMM identify this?

for example

if

fair fair fair biased biased fair fair biased

Hi,

I have a system of diff equations (see below). I am trying to obtain analytical solution. when I assume that z=wN, I receive such solution. Do anybody have idea if I know that z>wN, does this system has an analytical solution?

diff(K(t), t) = -(1/2)*(Q(t)^2*alpha^2*eta*upsilon-2*eta*alpha*(N*upsilon*w*C[max]-z*alpha*K(t))*Q(t)+N*w*(-2*C[max]*z*eta*alpha*K(t)+upsilon*((-N*w+z)*alpha+N*C[max]^2*w*eta)))*K(t)/((C[max]*w*N-alpha*Q(t))*upsilon*N*w)

diff(Q(t), t) = (1/2)*(-z*(Q(t)^2*alpha^2*eta-2*N*Q(t)*alpha*eta*w*C[max]+w*(w*(eta*C[max]^2-alpha)*N+z*alpha)*N)*K(t)-2*N*upsilon*w*(N*w-z)*(C[max]*w*N-alpha*Q(t)))/((C[max]*w*N-alpha*Q(t))*upsilon*N*w)

K(0) = K0, Q(0) = Q0

Thanks,

Dmitry

http://www.math.uni-frankfurt.de/~numerik/maplestoch/

read "D:/diffalg03/stochastic9";
Sigma := `<,>`(`<|>`(1.0, .5), `<|>`(.5, 1.0));
V := WienerProcess(Sigma);
Z := t -> exp(a*t+b*V(t)[1]+c*V(t)[2]);
drift1 := simplify(Drift(Z(t))/Z(t));
diffusion1 := simplify(Diffusion(Z(t))/Z(t));
with(stochastic);
linearsde(drift1, diffusion1[1][1]);
Euler(x[1],drift1,diffusion1[1][1]);

1.what are a, b, and c?

2. how to convert SDE for monte carlo for this ito formula?

3. how to convert to euler scheme with this ito formula

 

When greek symbols are used in code edit region (by copying from worksheet 2d math mode), they used to get exported properly to PDF but the only issue was large code edit region used to get cut off. But now with this new 18.01 update, code edit region is not cut off but greek symbol inside code edit region are not appearing in PDF export instead just pink boxes. Has anyone else also encountered this issue and suggest a resolution.

First 231 232 233 234 235 236 237 Last Page 233 of 334