MaplePrimes Questions

When one uses the PolynomialIdeals package, then how should he ask the elemnts in an ideal or the number of generators?

An idea can be writing a proc getting a polynomialideal and returning a list with the generators as its elements in this way. Converting the polynomialideal to a list, then deleting its three last entries. But I'm wondering if there is any other way to do this? It's reasonable to be able to ask generators of an ideal of result of some computations in polynomialideal package.

 

Dear Maple users,

I want to label Y axis such that it doesn't encroach the numbers. The figure below illustrates the difficulty I am facing. How can I change the default setting to put letter '\bar{U}' at some distance from Y axis so that it doesn't look crowded? Thanks.

Edit. One crude way to do this is by using typesetting command.

labels = [log(n), typeset(conjugate(U), " ")]

 

i am trying to write the differential equation 

u_{t}=u_{xx}+2u^{2}(1-u) in my maple 15. 

but it shows error,

Error, empty number and  1 additional error.
 

I'm trying to program a procedure that will return me a list of positions defining equally spaced points (planets) around a circumference, for example:
PSI := [0, Pi]; # Location of 2 planets
PSI := [0, ((2/3)*Pi) , ((4/3)*Pi) ]; # For 3 Planets
I'm new to maple so most commands are new to me, I tried building the size of the list with [0 $ n] because I want the first position to always be at 0 degrees. The first problem is that I get this error:

Error, reserved word `for` unexpected

 

nplanets := 2;

2

(1)

make_PSI :=
proc(nplanets);
local n,psin,i,PSI:
n = nplanets;
psin  :=(pi*2)/n;
PSI := [0 $ n];
for i from 1 to n do
 angle :=(psin*i);
 op(i,PSI) := angle;
end do;
end;

 

 

Error, reserved word `for` unexpected

 


Any advice would be appreciated!

Download planetspace.mw

If I let Maple be running on the computer for a while, maybe a day or 2 or so, I almost certainly get a change of several

characters. See my favourite palette:

 

 

As you can see the eternity sign e.g changes to a big N. If I rerun the worksheet everything works ok except for the change of characters.

Not seen above: :=  changes to d

Remedy?

 

hello...how I can pdsolve three equations with related boundary conditions?

please help me.

thanks...

J := f1(r, z)*f2(r, z)*f3(r, z):

`fθ` := f2(r, z)*f3(r, z)/fz:

m0 := 1:

``

g := r*ph/l:

sy := (1/2)*arctan(2*g*fz^2/(-fz^2+g^2+`fθ`^2-1)):

I4 := (f2(r, z)^2*cos(sy)^2+f3(r, z)^2*sin(sy)^2-(.25*(f2(r, z)^2-f3(r, z)^2))*sin(2*sy)^2/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2))*cos(b)^2+.5*f2(r, z)*f3(r, z)*(f2(r, z)^2-f3(r, z)^2)*sin(2*sy)*sin(2*b)/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)+((f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)^2+(.25*(f2(r, z)^2-f3(r, z)^2))*sin(2*sy)^2/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2))*sin(b)^2:

I6 := (f2(r, z)^2*cos(sy)^2+f3(r, z)^2*sin(sy)^2-(.25*(f2(r, z)^2-f3(r, z)^2))*sin(2*sy)^2/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2))*cos(b)^2-.5*f2(r, z)*f3(r, z)*(f2(r, z)^2-f3(r, z)^2)*sin(2*sy)*sin(2*b)/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)+((f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)^2+(.25*(f2(r, z)^2-f3(r, z)^2))*sin(2*sy)^2/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2))*sin(b)^2:

L := (I4-1)*exp(K2*(I4-1)^2-1):

N := (I6-1)*exp(K2*(I6-1)^2-1):

P23 := -f2(r, z)*f3(r, z)*sin(b)*cos(b)+(.5*(f2(r, z)^2-f3(r, z)^2))*sin(sy)^2*sin(b)^2:

P32 := -f2(r, z)*f3(r, z)*sin(b)*cos(b)+(.5*(f2(r, z)^2-f3(r, z)^2))*sin(sy)^2*sin(b)^2:

P33 := (f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)*sin(b)^2:

P22 := ((f2(r, z)^2*cos(sy)^2+f3(r, z)^2*sin(sy)^2)^2-(.25*(f2(r, z)^2-f3(r, z)^2))*sin(2*sy)^2)*cos(b)^2/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)-f2(r, z)*f3(r, z)*(f2(r, z)^2-f3(r, z)^2)*sin(2*sy)*sin(b)*cos(b)/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)+(.25*(f2(r, z)^2-f3(r, z)^2))*sin(2*sy)^2*sin(b)^2/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2):

S23 := f2(r, z)*f3(r, z)*sin(b)*cos(b)+(.5*(f2(r, z)^2-f3(r, z)^2))*sin(sy)^2*sin(b)^2:

S32 := f2(r, z)*f3(r, z)*sin(b)*cos(b)+(.5*(f2(r, z)^2-f3(r, z)^2))*sin(sy)^2*sin(b)^2:

S33 := (f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)*sin(b)^2:

S22 := ((f2(r, z)^2*cos(sy)^2+f3(r, z)^2*sin(sy)^2)^2-(.25*(f2(r, z)^2-f3(r, z)^2))*sin(2*sy)^2)*cos(b)^2/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)+f2(r, z)*f3(r, z)*(f2(r, z)^2-f3(r, z)^2)*sin(2*sy)*sin(b)*cos(b)/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2)+(.25*(f2(r, z)^2-f3(r, z)^2))*sin(2*sy)^2*sin(b)^2/(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2):

Trr := k0*(J-1)+(1/3)*m0*(2*f1(r, z)^2-f2(r, z)^2-f3(r, z)^2)/J^(5/3):

`Tθθ` := k0*(J-1)+m0*(f2(r, z)^2*cos(sy)^2+f3(r, z)^2*sin(sy)^2-(1/3)*f1(r, z)^2-(1/3)*f2(r, z)^2-(1/3)*f3(r, z)^2)/J^(5/3)+2*k1*(L*S22+N*P22)/J:

`Tθz` := m0*(f2(r, z)^2-f3(r, z)^2)*sin(sy)*cos(sy)/J^(5/3)+2*k1*(L*S23+N*P23)/J:

`Tzθ` := m0*(f2(r, z)^2-f3(r, z)^2)*sin(sy)*cos(sy)/J^(5/3)+2*k1*(L*S23+N*P23)/J:

Tzz := k0*(J-1)+m0*(f2(r, z)^2*sin(sy)^2+f3(r, z)^2*cos(sy)^2-(1/3)*f1(r, z)^2-(1/3)*f2(r, z)^2-(1/3)*f3(r, z)^2)/J^(5/3)+2*k1*(L*S33+N*P33)/J:

`Trθ` := 0:

`Tθr` := 0:

Trz := 0:

Tzr := 0:

NULLpartial equations

equ(1) := r*(diff(Trr, r))+Trr-`Tθθ`:

equ(2) := diff(`Tθz`, z):

equ(3) := diff(Tzz, z):

# BOUNDARY CONDITIONS

Trr := proc (ro, z) options operator, arrow; 0 end proc:

int((`Tθθ`-Trr)/r, r, ri, ro) := 13.3*10^3:

2*Pi*(int(Tzz*r, r, ri, ro))-13.3*Pi*ri^2*10^3

Error, (in int) wrong number (or type) of arguments: invalid options or option values passed to indefinite integration. Unknown options: {ro, .8333333333*f1(r, z)*f2(r, z)}

 

int(`Tθz`*r^2, r, ri, ro) := 10:

NULL


 

Download for_site.mw

hello...how I can pdsolve three equation with related boundary conditions?

please help me.

thanks...

for_site.mw

Hello, 

I'm having trouble seeing which command is calling the "thaw" for the code below and was wondering if someone is able to save me the trouble from working it out myself. i know its not when the "is" function is called from viewing the showstat for it, but the output prior to mapping that function pops out with no troubles, so im guessing its the generic mapping proc, but of course, in built function so i can only assume its the same way i would write it but im pretty sure i dont use thaw either so anyway the line in question:

map(is, seq(seq(map(eval, Matrix(3, omega[1]) = Matrix(3, omega[0]), [n = i, m = j]), i = 1 .. 10), j = 1 .. 10));
Error, (in thaw) too many levels of recursion
 

 

Hi guys ,

i have a manifold ( schwarzschild spacetime ) which want to find Gibbons-Hawking boundary term.

boundary.mw

 

Thanks in advance

Maple 2017.1 on windows 7.

This is VERY frustrating. If I have a string which is too long (do not blame me, it is Maple's output), and  try to save it to text file using fprintf(), then Maple decides to insert CARRIAGE RETURN at about each 1,000,000 characters intervals. 

So if the string happened to be 5 million chars, and instead of getting one long line in the file for this one result, It writes 5 lines in the file.

Becuase of this, I can't postprocess this output, since the program that reads the file expects one line per one result. So it fails to parse it. And having to post process the file to correct this is not easy at all.

Why is there a limitation of writing long string to a file without it being chopped of like this? Is there a way to work around this? Here is a MWE

 

restart;
directory("C:\\bug");
result:=int((a+b*tan(e*x+d)+c*tan(e*x+d)^2)^(1/2)*tan(e*x+d)^2,x):
result_as_string:=convert(result,string):
fd := fopen("out.txt",WRITE):
fprintf(fd,"%s\n",result_as_string);
fclose(fd);

As you can see, I wrote the result as one string. Now if you look at the file out.txt in the directory (you might want to use good editor for this, such as vi or textedit), you will see many lines in there, and not one long line as expected. Or you can run this code

restart;
directory("C:\\bug");
number_of_lines :=0:
line:=readline("out.txt"):
while line <>0 do
   number_of_lines :=number_of_lines + 1:
   line:=readline("out.txt"):
od:
print(` number of lines read is `,number_of_lines);

The above gives

                ` number of lines read is `, 24

This problem now means I am not able to continue with what I am doing. Does this happen on other platforms?

I think this happens due to Maple limits

      `[Length of output exceeds limit of 1000000]`

However, I am NOT dispalying anything on the screen. This is all going to text files.  It seems Maple output limits of 1,000,000 is confusing fprintf() to a file as well?

When we have a two variable function f(x,y), Maple can plot f-inverse of a value with contourplot. But how about contourplot of a three variable function? for example f-1(0) which can be a surface in the 3 dimensional space. The contourplot3d is just the contourplot (2-dimensional) which also shows the value of f(x,y) on the third axis. So this is not what I want.

Hi,

I am trying to execute a for loop for some repetitive calculation. For eg. i is varying from 1 to 10 and j is varying from 1 to 6. For each combination of i and j, I am computing  value of a function.  I got output for some initial (i,j) pair in for loop. After that, an error encountered and for loop interrupted( stopped). How can I tell maple to continue  for loop even when some error occurred for some combination of (i,j) pair. Maple can discard the output for which an error occurred and can continue the foor loop for the remaining (i,j) pair. For eg.

1) In for loop, I am using NLPSolve command and after giving some initial result it shows-

Error, (in Optimization:-NLPSolve) complex value encountered.

2) Similarly, in for loop, I am using DirectSearch[search] command and after giving some initial result it shows-

Error, (in DirectSearch:-Search) cannot find feasible initial point; specify a new one

Please guide me in this problem..

Thanks and Regards,

Nilesh

Hi,

I have a multi dimensional array ( 10 by 6 by 7) and I want to know How can I transfer the content of this three dimensional arrany into MS Excel. Is any procedure avaialbe for this?

Thanks and Regards,

Nilesh Asnani

 

Hi,

Although everyone one might know, but still I want to clarify the concept of Sensitivity analysis. Suppose we have an objective function Z in which we have two variables X & Y and two parameters a and b. So in sensitivity analysis, we systematically change the values of parameters ( for eg. changing value of "a" by 20%, then 40%, then 60%, similiarly for parameter "b"). At a time, we only change the value of one parameter and the values of other parameters remain fixed to their original value. Then we would again solve the model ( ie. objective function Z) and calculate the new values of objective function and variables.  Then we try to see the impact of parameter change on the value of objective function Z and on variables X & Y.

The formula for sensitivity analysis for parameter a is  for objective function Z =

 (new values of objective function  - old value of objective function)*100 / (old value of objective function)

Here new value of objective function Z denotes when we use changed value of paramter a (keeping other parameter values fixed to their original value) and old value of objective function denotes value of Z with all parameters (including parameter a) at their original value

Although I can do it by a for loop but it is not an efficient procedure and also time consuming. Can anybody suggest whether any package suitable for sensitivity analysis is available in maple.

Thanks for your attentive reading of problem.

Thanks and Regards,

Nilesh

 

Is there any command or package in Maple that computes blow ups? I didn't find blow up in the help.

Please simplify the expression in image.Kind Regards,

 

First 958 959 960 961 962 963 964 Last Page 960 of 2429