Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

This is on Maple 2017.3 under windows

After obtaining solution from pdsolve(), I tried to see if Maple can convert it to hyperbolic trig functions by calling `convert(sol,trigh)`. 

 

I waited and waited and nothing happened. Then clicked on the `interrupt current operation` button at top of menu. 

But I found that mserver.exe has hanged in a loop. Taking 100% CPU and still running. So Had to terminate it from task manager.

Question is: It is ok if Maple can't do the conversion, but why does it hang? Maybe if I want for one hr it will finish, I do not know. But the important part, why does `interrupt current operation` does not work, in the sense that the mserver.exe is still running?

Is this common thing to happen? Should this be fixed? 

Here is example

 

restart;
interface(showassumed=0);
pde:=diff(u(x,y),x$2)+diff(u(x,y),y$2)=0;
f:=x-> piecewise(x>0 and x<1/2, 2*x, x>1/2 and x<1, 2-2*x);
bc:=u(0,y)=0,u(1,y)=0,u(x,0)=f(x),u(x,2)=f(x);
sol:=pdsolve([pde,bc],u(x,y)) assuming x>0,y>0;

The above works OK and generates a solution. Now the next call hangs mserver.exe

convert(sol,trigh);

In case your Maple version can't solve the above PDE. Here is the solution obtained, so you can try this below without having to solve the PDE

 

sol := u(x, y) = Sum(8*sin((1/2)*n*Pi)*sin(Pi*x*n)*(exp(Pi*n*(3*y-2))-
         exp(Pi*n*(3*y-4))+exp(Pi*y*n)-exp(Pi*n*(y-2)))*exp(-2*Pi*n*(y-2))/(Pi^2*n^2*(exp(4*n*Pi)-1)),
            n = 0 .. infinity);
convert(sol,trigh);

I also tried convert(rhs(sol),trigh); but it made no difference.

 

This is my code.  It's not appending as I need it to.  Any help would be humbly and gratefully appreciated!

 


 

restart; Sort4 := proc (Q, T, U, Rx1, Ry1, Rx2, Ry2, Rx3, Ry3, Rx4, Ry4) local i, k; description "Organizes vectors Q,T into new vectors Rx1...Ry4 correspponding to values of U."; for i from 5 to nops(U) do if U(i) = 1 then Append(Rx1, Q(i)); Append(Ry1, T(i)) elif U(i) = 2 then Append(Rx2, Q(i)); Append(Ry2, T(i)) elif U(i) = 3 then Append(Rx3, Q(i)); Append(Ry3, T(i)) elif U(i) = 4 then Append(Rx4, Q(i)); Append(Ry4, T(i)) end if end do; return Rx1, Rx2, Rx3, Rx4, Ry1, Ry2, Ry3, Ry4 end proc

Q, T, U := `<,>`(0, 2, 4, 6, 7, 17, 27, 57, 67, 97), `<,>`(0, 2, 1, 8, 19, 20, 21, 22, 23, 24), `<,>`(o, o, o, o, 1, 2, 3, 2, 4)

Vector[column](%id = 18446744078670632710), Vector[column](%id = 18446744078670632830), Vector[column](%id = 18446744078670632950)

(1)

Rx1 := Vector([Q(1)]); Ry1 := Vector([T(1)]); Rx2 := Vector([Q(2)]); Ry2 := Vector([T(2)]); Rx3 := Vector([Q(3)]); Ry3 := Vector([T(3)]); Rx4 := Vector([Q(4)]); Ry4 := Vector([T(4)])

_rtable[18446744078670623558]

 

_rtable[18446744078670624518]

 

_rtable[18446744078670625238]

 

_rtable[18446744078670625958]

 

_rtable[18446744078670626678]

 

_rtable[18446744078670619222]

 

_rtable[18446744078670619942]

 

Vector[column](%id = 18446744078670620662)

(2)

Sort4(Q, T, U, Rx1, Ry1, Rx2, Ry2, Rx3, Ry3, Rx4, Ry4)

Vector[column](%id = 18446744078670623558), Vector[column](%id = 18446744078670625238), Vector[column](%id = 18446744078670626678), Vector[column](%id = 18446744078670619942), Vector[column](%id = 18446744078670624518), Vector[column](%id = 18446744078670625958), Vector[column](%id = 18446744078670619222), Vector[column](%id = 18446744078670620662)

(3)

``


 

Download Sort4_320.mw

How can i print maple file? when ever i press ctrl+ p it never responce any thing can we print maple file directly? if yes then please how?

Hello 

how can I write a loop of two variables (i,j )for this formula?

where m& n are fixed numbers.

looking forward to hearing from you.

Thanks

Strange (inconsistent) behavior of eval in piecewise

 

restart;#####################

a:=2:

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < 2, 1/(-2+x), x = 2, 22, 33)

(1)

eval(p, x=a);

22

(2)

restart;#####################

a:=Pi:

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < Pi, 1/(-Pi+x), x = Pi, 22, 33)

(3)

eval(p, x=a);

Error, (in eval/piecewise) numeric exception: division by zero

 

restart;#####################

a:=Pi+ln(2):

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < Pi+ln(2), 1/(-Pi-ln(2)+x), x = Pi+ln(2), 22, 33)

(4)

eval(p, x=a);

22

(5)

restart;#####################

a:=Pi+1:

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < Pi+1, 1/(-Pi-1+x), x = Pi+1, 22, 33)

(6)

eval(p, x=a);

Error, (in eval/piecewise) numeric exception: division by zero

 

restart;#####################

a:=gamma:

p:=piecewise(x<a, 1/(x-a), x=a, 22, 33);

p := piecewise(x < gamma, 1/(-gamma+x), x = gamma, 22, 33)

(7)

eval(p, x=a);

Error, (in eval/piecewise) numeric exception: division by zero

 

#######################

f:=x->piecewise(x<Pi, 1/(x-Pi), x=Pi, 22, 33);

f := proc (x) options operator, arrow; piecewise(x < Pi, 1/(x-Pi), x = Pi, 22, 33) end proc

(8)

f(Pi);

22

(9)

 


Download piecewise-strange.mw

how can save of resultes as matrix in file.dat?

 

I am trying to make a library, and therfore package that contains a bunch of objects that inherit from each other.

I understand how to create objects that inherit from one another and my code here works fine:

module ParentObject()
   option object;
end module;

module ChildObject()
   option object(ParentObject);
end module;

However when I put it all in a package with code below:

module Package()
   option package;
   export ParentObject, ChildObject;
   
   module ParentObject()
      option object;
   end module;

   module ChildObject()
      option object(ParentObject);
   end module;

end module;

I get the error "Error, argument of option object(ParentObject) refer to another object in module Package:-ChildObject".

Any sugguestions?

Near the top of the large loop at the bottom of the uploaded worksheet IntSect is copied to IntSectRoll.

IntSectRoll is then modified several times within the loop. However IntSect also changes content even though there are no commands within the loop to cause this.

To avoid this is the reason IntSect is recreated from previous data each time before it is copied.

Is this a bug in my worksheet or in Maple 2016?

Constant_Diameter.mw

The theory behind the worksheet is described, without attribution, in the book The Penguin Dictionary of Curious and Interesting Geometry by David G. Wells.

Does this theory have a name and a discoverer?

f(x)=sqrt(sin(x)); x over the intervall [0,T]

can anyone help me to find this integral ?

 

I might be doing something wrong since I expected Maple to be able to solve this. Could some Maple manage to make Maple solve the following beam PDE problem taken from a textbook?

 

This is what I tried.

restart;
pde:=diff(u(x,t),t$2)+diff(u(x,t),x$4)=0;
bc:=u(0,t)=-12*t^2,u(1,t)=1-12*t^2,D[1,1](u)(0,t)=0,D[1,1](u)(1,t)=12;
ic:=u(x,0)=x^4,D[2](u)(x,0)=0;
sol:=pdsolve({pde,ic,bc},u(x,t));

But Maple returns no solution.

I am using Maple 2017.3 on windows.

 

When I enter this code:

de3a := diff(x(t), t) = (x(t))(1-.5*x(t)-.5*y(t)); de3b := diff(y(t), t) = (y(t))(-.25+.5*x(t));
sys3 = {de3a, de3b};

window := x = -1 .. 3, y = -1 .. 3;
DEplot(sys3, [x(t), y(t)], t = 0 .. 14, window);

 

I get the error message "Error, (in DEtools/DEplot) system must have same number of dependent variables as DE's." What am I doing wrong? I'm just trying to create a plot on the phase plane.
 

 

Hi all, 

 

How could I be certain about the correctness of these answers? I am sure that the variation of the parameter, C1, must be monotonic; just in one dircetion... increasing or decreasing. As you could see from the last result in the first command, the data are false... However, by the second method, the answer is different from that of the first!!!? Both of them are derived by 'fsolve'
In the third way, the command dsolve, produced an array of resutls, C1 and Nu, and there is just one correct solution... It is confusing.

DeriveNu-T.mw

I am puzzled by the strange behaviour of the following exampleSectionaken directly from the Programming Guide section 8.6. When I copy the example from the help to a worksheet as follows, I get an error stating that module m does not evaluate to a module in the use statement. 

> m := module() export a, b; a := 2; b := 3; end module:
use m in a + b end use;

Error: `m` does not evaluateto a module.

However, after a restart, when I execute the two statements as separate statements (separate prompts), the module does evaluate properly.

My question is, what is the safe workaround in coding to avoid this situation.

I have attached the worksheet.moduleeval.mw

can you pls help with that

 

if 0 denotes the zero matrix,

then show that e^0 = I, the identity matrix 

Hello,

 

It has come to my attention that Alan Baker has recently passed away, and not being of an institutional affliation it was some what late in me finding out.

But his work was of huge inspiration to me, so I felt as if it should be noted how brilliant this man was, and how much he ought to be missed be the mathematical community at large.

https://en.wikipedia.org/wiki/Alan_Baker_(mathematician)

First 834 835 836 837 838 839 840 Last Page 836 of 2216