Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I am using Maple 15 to numerically solve a system of differential algebraic euqations (DAE) with given initial conditions, and I've tried rfk45_dae and rosenbrock_dae solver, but both solver responded in error like this

 

Error, (in dsolve/numeric) cannot numerically solve complex DAE initial value problems, the system must be converted to a real system

 

I don't understand what is a real system, and how could i convert it to a real system.

 

I'm running a long loop with a lot of variables. I have noticed that Maple does not seem to clear its memory after each loop iteration, which results in very large memory used after all the iterations. I can't use restart because I need a few variables to be remembered throughout the loop for analysis afterwards. So the question is how to clear the memory for selective variables and procedures at the end of each iteration.

I need to plot a function:



f(1.0) gives a correct result but plot doesn't. Could you help me with it?

Dear those who are in Mapleprimes,

 

As I can't understand how Maple calculate the quick sort, I write the present question, hoping that someone give me a hint.

In essence, nested procedure I cannot understand is this:

 

quicksort:=proc(A,m,n)

....................

if m<n then

quicksort(A,m,p-1);.................................(1)

quicksort(A,p+1,n)...................................(2) 

end if;

eval(A);

end proc:

 

Details were ommitted, but I have to say that p is the number between m and n, which is determined by ommitted parts of 

the procedure.

And, with this nested procedure, 

quicksort([2,4,1,5,3],1,5) is calculated.

 

What I want to know is how to process the parts of (1) and (2).

If after (1) is processed, (2) is processed, what is the value of p in (2).

Is it the p which is determined successively through processing nested value of (1)?

 

Thank you in advance.

 

taro

Can anyone help to compute the following integral in terms of the bessel functions in maple.

Hey guys! Can someone please help me by telling what I can insert into maple to get answer for this question? Thanks!

The help documents read,

 The function unames returns an expression sequence consisting of all the active names in the current Maple session which are ``unassigned names''.

 

But what unames() returns is obviously not the contents one expects:

 

i am trying to execute the following code but i am having the following error:

A:=Matrix(21,4):A(1,2):=0:A(2,2):=0:t:=2: thetasec:=-8.724679300*10^(20):  for z from 0.1 by 0.05 to 1 do  t:=t+1: A[t,1]:=z:  x:=2*A[t-1,2]-A[t-2,2]+thetasec*0.05^(2):  theta2:=evalf(arctan(sin(x-Pi),cos(x-Pi))+Pi):    if theta2>Pi/(2)and theta2<=(3*Pi)/(2)then   A[t,2]:=theta2-Pi   elif theta2>(3*Pi)/(2)then A[t,2]:=theta2-2*Pi else  A[t,2]:=theta2 fi:  A[t,3]:=cos(A[t,2]):  A[t,4]:=sin(A[t,2]):

A:=Matrix(21,4):A(1,2):=0:A(2,2):=0:t:=2: thetasec:=-8.724679300*10^(20):  for z from 0.1 by 0.05 to 1 do  t:=t+1: A[t,1]:=z:  x:=2*A[t-1,2]-A[t-2,2]+thetasec*0.05^(2):  theta2:=evalf(arctan(sin(x-Pi),cos(x-Pi))+Pi):    if theta2>Pi/(2)and theta2<=(3*Pi)/(2)then   A[t,2]:=theta2-Pi   elif theta2>(3*Pi)/(2)then A[t,2]:=theta2-2*Pi else  A[t,2]:=theta2 fi:  A[t,3]:=cos(A[t,2]):  A[t,4]:=sin(A[t,2]):od

Error, cannot determine if this expression is true or false: (1/2)*Pi < 3.535344555 and 3.535344555 <= (3/2)*Pi

what is causing this error and how can i fix it 

 

I'm using Maple 12 to solve a system of differential equations numerically. I first define my system as "sys1" and then use the command:

sol1 := dsolve(sys1, numeric, output = listprocedure, range = 0 .. 2000)

I'm using output=listprocedure because that's what the Maple's Help says if I want to use individual solutions. So my differential equation system has 8 solutions, and I label them a1(t) through a8(t). Now after solving the system I want to be able to evaluate, e.g., a1(t) at t=100.

I then follow the Maple's Help by defining:

f1(t):=eval(a1(t),sol1)

But then if I do:

f1(100)

I don't get the expected numerical value. Instead I get a1(100) as the result.

What I managed to do however was to plot f1(t) with the following command:

plot(f1(t),0..2000)

So it seems that I did it partially right. However according to the Maple's Help I should be able to extract numerical values with f1(100). 

I'd appreciate any suggestions!

Maplesoft regularly hosts live webinars on a variety of topics. Below you will find details on some upcoming webinars we think may be of interest to the MaplePrimes community.  For the complete list of upcoming webinars, visit our website.

 

Bring Statistics Education to Life!

This exciting new webinar will demonstrate some of the ways that educators can take advantage of Maple’s symbolic and numeric approach for statistics education. Examples will include basic statistics theory including descriptive statistics such as measures of central tendency and spread, hypothesis testing, as well as discrete and continuous random variables.

Many examples presented in this webinar will be taken from the new Student Statistics package that was introduced in Maple 18. The Student Statistics was designed with classroom use in mind, and features detailed explanations and instructions, interactive demonstrations, and visualizations, all of which are great learning tools for teaching a course involving probability and statistics.

To join us for the live presentation, please click here to register.

 

Symbolic Computing for Engineering

As engineering applications become more complex, it is becoming increasingly difficult to satisfy the often-conflicting project constraints using traditional tools. As a result, we’ve found there is a growing interest within the engineering community for tools that make engineering calculations transparent and capture not just results but also the knowledge and analysis used throughout the engineering workflow. Engineering organizations are achieving this goal by making symbolic techniques an integral part of their tool set.

In this webinar, Laurent Bernardin will demonstrate how to enhance the early-stage design phase by making mathematical computations explicit and transparent, and then integrating the results into an existing tool chain.

To join us for the live presentation, please click here to register.

Hello,

It is not a very important question... but i like when i have a nice worksheet.

I would like to change the color of the maple input. Unfortunately, i manage to change the color for the inputs already created but not for the new maple input.

How can i change the color for the new maple input i want to create ?

Thank you for your help.

How can I solve raychaudhuri equations numerically using GRtensor?

g := (-12*y^2+1)/(4*y^2+1)^3 * ln(abs(-1+2^(1-x-I*y)));

Compute Int(g, [x=1/2 .. infinity, y=0 .. infinity]).

PS: this stems from How to calculate hard integral?,
but it is not related to the RH.

My problem is i am working with a very large randomly generated output, generated using maple's builtin in random generating functions. I have the output which i want to investigate but i want to be able to reproduce this result when i save and close the worksheet. Since the list of generators is very long copy pasting is not very nice and i donot know the seed of these generaters. I want to ask if i can store the values in variable in the worksheet so that when i open the worksheet i can get the same random generates stored in the variable.

Dear All

 

I have a question about applying fsolve in MAPLE.

These codes come from an applicable model from heat transfer.

I previously solve such systems, but the fsolve takes long time, for example for N=2, I have 12 equations with 12 unknowns. But the fsolve does not work!

I try by N=3 or N=4, but a similar result has been obtained.

 

If kindly is possible, please give me a help for using fsolve more efficiently that solve my problem.

I have MAPLE 13 in my PC.

 

With kind regards,

Emran Tohidi.

 

> restart;
> with(orthopoly);
print(`output redirected...`); # input placeholder
> Digits := 20;
> N := 3; f := proc (x) options operator, arrow; cos(Pi*(x-1/2)) end proc; h1 := proc (t) options operator, arrow; 0 end proc; h2 := proc (t) options operator, arrow; 0 end proc; E := proc (t) options operator, arrow; cos(.2*Pi)*exp(-t^2) end proc;
print(`output redirected...`); # input placeholder
> u := sum(sum(b[m, n]*P(m, 2*x-1)*P(n, 2*t-1), m = 0 .. N), n = 0 .. N);
print(`output redirected...`); # input placeholder
> u := unapply(u, x, t);
print(`output redirected...`); # input placeholder
> ut := diff(u(x, t), `$`(t, 1)); ut := unapply(ut, x, t);
print(`output redirected...`); # input placeholder
> uxx := diff(u(x, t), `$`(x, 2)); uxx := unapply(uxx, x, t);
print(`output redirected...`); # input placeholder
> a := sum(c[m]*P(m, 2*t-1), m = 0 .. N); a := unapply(a, t);
print(`output redirected...`); # input placeholder
> A := fsolve(P(N+1, 2*x-1) = 0);
print(`output redirected...`); # input placeholder
> S1 := {seq(seq(ut(A[i], A[j])-a(A[j])*uxx(A[i], A[j]) = 0, i = 2 .. N), j = 2 .. N+1)}; S2 := {seq(u(A[i], 0)-f(A[i]) = 0, i = 2 .. N)}; S3 := {seq(u(0, A[j])-h1(A[j]) = 0, j = 1 .. N+1)}; S4 := {seq(u(1, A[j])-h2(A[j]) = 0, j = 1 .. N+1)}; S5 := {seq(u(.3, A[j])-E(A[j]) = 0, j = 1 .. N+1)}; S := `union`(`union`(`union`(`union`(S1, S2), S3), S4), S5);
print(`output redirected...`); # input placeholder
> sol := fsolve(S);



First 1340 1341 1342 1343 1344 1345 1346 Last Page 1342 of 2224