Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

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,

 

Hi Maple friends,

I am trying to run a script I have written in Maple 2016 directly from my Terminal on my MacAir. I have OSSierra 10.12.1 and Maple 2016.

My script needs to read a file in and then run, whilst writing to some files on the way. I need this, since I want my script to be run on a large computer on my institute, where I have no interface/Maple open and has to access data on the way.

So, I go to Terminal, and stand in the directory of where the file/scrips is (lets call it terminal_test.mpl OR terminal_test.txt) and then write:

./maple terminal_test.mpl

and get back

No such file or directory 

I also get this if I use .txt file AND if I write "Maple 2016" instead of ./maple. I have tried to write 

open "Maple 2016" terminal_test.mpl 

and then Maple opens in the right file, but does not run it. This is just to show, that my terminal can find the program. But this is not what I want. As I said, I would like it to:

start running a script from Terminal - read a file to be used in the script - on the way, write to 6-8 different files, that I can then access whilst the script is running. So my questions are: 

  1. How do I run the script/file in the first place, and am I in the right place?
  2. Where do I place the files to be read during the running of the script (Reading to script works fine already, so it should work also if I can just run the script/file)?
  3. Where do the files I create in my script end, so I can access them?

Thank you so much for any answer - I have not been able to find anything on the net so far that could help me, but I know you guys are really good on this.

Tomas.

 

We have just released the 3rd edition of the Mathematics Survival Kit – Maple Edition.

The Math Survival Kit helps students get unstuck when they are stuck. Sometimes students are prevented from solving a problem, not because they haven’t understood the new concept, but because they forget how to do one of the steps, like completely the square, or dealing with log properties.  That’s where this interactive e- book comes in. It gives students the opportunity to review exactly the concept or technique they are stuck on, work through an example, practice as much (or as little) as they want using randomly generated, automatically graded questions on that exact topic, and then continue with their homework.

This book covers over 150 topics known to cause students grief, from dividing fractions to integration by parts. This 3rd edition contains 31 additional topics, deepening the coverage of mathematical topics at every level, from pre-high school to university.

See the Mathematics Survival Kit for more information about this updated e-book, including the complete list of topics.

eithne

Suppose I want to revolve the curve given in the (X,Y)-plane by the set of parametric equations

x(t) = cos(t) + t sin(t)

y(t) = sin(t) - t cos(t)

 

for t in [0,Pi/2] around the X-axis. How can I plot the given surface of revolution? Similarly, the same question for

x(t) = exp(t)*cos(t)

y(t) = exp(t)*sin(t)

 

for t in [0,Pi/2]

How to plot an Elliptical Function of Third kind complete or incomplete, eg. EllipticPi(n,k) if n and k are not constants?

as The function I wish to plot and explore contains Elliptical Function of Third kind complete and incomplete with complicated form of n and k.

Please reply asap.

Regards

First 935 936 937 938 939 940 941 Last Page 937 of 2215