Maple Questions and Posts

These are Posts and Questions associated with the product, Maple


Hello there,

I have created a MAPLE document in a slideshow format.

Is there a way to print a copy of my presentation with header and footer included and in a format that fits on letter format paper or pdf.

Thank you for your help.

LL

I have 2 questions here

1st I want to extend this set Ug3 := {1, 19, 23, 29} by repeatively subtracting 6 fron its elements. first pass should give

Ug3 := (Ug3-~ 6) union Ug3  Ug3 := {-5, 1, 13, 17, 19, 23, 29}

Now I dont want to add any elenments less than 6 so -5 need to go

Second pass produces

Ug3 := (Ug3-~ 6) union Ug3                Ug3 := {-11, -5, 1, 7, 11, 13, 17, 19, 23, 29}

Obiviously no elements less than 6 to be added on second pass either.

At this point there is no further elements that could be added to the set.

I am looking for an efficient method. I can use For loops and if then checks. The sets grow in length quickly. Repetition lengths are 6, 30 210, 2310,... I use sets because the numbers get ordered automaticially. Are sets efficient or should I use some form of table?
 

I understand that Maple 2018 is now able to solve 3 independent variable PDE & BC problems in bounded domains through separation of variables by product and eigenfunction expansion.

My solution domain is (x,y,t), (i.e three independent variables) but I would like to need to use numerical integration.  Are there plans to make numerical integration for PDEs with three independent availables, and if so when is that facility likely to be available?

Melvin

 

 

restart: with(plots):
bisect:=proc(f, intbeg::numeric, intend::numeric, ss::float, del::float)
   local Num_points,limit1,approx,i,x1,x2,a,b,flag1,pet,A,B,NewApprox,CheckIt,newDelta,
         interval_begin,interval_end,step_size,delta, y_approx, y_A, y_New;

interval_begin:=intbeg:
interval_end:=intend:
step_size:=ss:
delta:=del:
Num_points:=0:
print([x,y]);
limit1:=200:

for i from interval_begin by step_size to interval_end do
   x1:=i:
   x2:=i+step_size:
   if x1=0 then x1:=-10^(-5)fi:
   if x2=0 then x2:=-10^(-5)fi: 
   a := evalf( f(x1) ):
   b := evalf( f(x2) ):
    if a=0 then a:=-10^(-5)fi:
    if b=0 then b:=-10^(-5)fi:
   flag1:=0:

   if evalf(a*b) <= 0 then 
     approx := (x1+x2)/2:
     y_approx := evalf( f(approx) ):
     if abs(y_approx) < delta then 
        print([approx, y_approx]):
        Num_points:=Num_points+1: 
     else
        pet:=0:
        A:=x1:
        B:=x2:
        while pet=0 do
           NewApprox:=(A+B)/2:
           y_A := evalf( f(A) );
           y_New := evalf( f(NewApprox) ); 
           CheckIt := y_A * y_New:
           newDelta:=abs( y_A - y_New ):
           flag1:=flag1+1:

           if newDelta <= delta then
              print([NewApprox, y_New]):
              pet:=1:
              Num_points:=Num_points+1:
           elif CheckIt > 0 then
                 A:=NewApprox;
           else
                 B:=NewApprox; 
           fi:

           if flag1 > limit1 then
              pet:=1:
              print(`*** Exceeds limits****`);    
           fi:
        od:
     fi:
 fi:

od:

print(`Number of Roots Found = `,Num_points):
plot(f(x), x=interval_begin..interval_end, color=red, thickness=1);

end:
 

I'm working on several worksheets where I solve numerical DE's. I would like to compare the solutions by plotting in one graph So I though it would be nice to have a seperate worksheet for this.

My approach:

Statements from my original sheets:
> solution:=dsolve({ODES,ICS},maxfun=0,numeric,range=0..10,output=listprocedure):
> X__br:=eval(xbr(t),solution):


I can plot these variables in my original sheet with plot(X__br(t),t=0..10).
However, when I transfer it to a different sheet by:

> save X__br, "filename.mpl"

And then load it into a new sheet by
> read("D:/.../filename.mpl");

There seems to be no possible way to plot the X__br(t) anymore. How can I solve this?
My error when I try plot(X__br(t),t=0..10) is:

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

Hi,

Just a detail : How to get the power write in title ( without displaying the symbol ^ ) ?

Thanks

PDFColorTitle.mw

Hi,

How do I change the color of the title of my graph? Thanks

PDFColorTitle.mw

Hi, 

Could you explain me where the third output comes from?

print~([a, b]);
   a
   b
   [ ]

Thanks in advance

How I can perform integration by parts, with respect to the x[0..1],y[0..1],t 

PART.mw
 

restart

U := (1/2)*(E*(diff(u(x, y), x)-z*(diff(w(x, y), x, x))+(1/2)*(diff(w(x, y), x))^2)/(-upsilon^2+1)+E*upsilon*(diff(v(x, y), y)-z*(diff(w(x, y), y, y))+(1/2)*(diff(w(x, y), y))^2)/(-upsilon^2+1))*(diff(u(x, y), x)-z*(diff(w(x, y), x, x))+(1/2)*(diff(w(x, y), x))^2)+(1/2)*(E*upsilon*(diff(u(x, y), x)-z*(diff(w(x, y), x, x))+(1/2)*(diff(w(x, y), x))^2)/(-upsilon^2+1)+E*(diff(v(x, y), y)-z*(diff(w(x, y), y, y))+(1/2)*(diff(w(x, y), y))^2)/(-upsilon^2+1))*(diff(v(x, y), y)-z*(diff(w(x, y), y, y))+(1/2)*(diff(w(x, y), y))^2)+E*(1-upsilon)*((1/2)*(diff(v(x, y), x))-z*(diff(w(x, y), x, y))+(1/2)*(diff(u(x, y), y))+(1/2)*(diff(w(x, y), x))*(diff(w(x, y), y)))^2/(-upsilon^2+1)+2*E*l^2*(diff(w(x, y), x, y))^2/(2+2*upsilon)+2*E*l^2*(-(1/2)*(diff(w(x, y), x, x))+(1/2)*(diff(w(x, y), y, y)))^2/(2+2*upsilon)+2*E*l^2*((1/4)*(diff(v(x, y), x, x))-(1/4)*(diff(u(x, y), x, y)))^2/(2+2*upsilon)+2*E*l^2*((1/4)*(diff(v(x, y), x, y))-(1/4)*(diff(u(x, y), y, y)))^2/(2+2*upsilon)

with(IntegrationTools)

``

``


 

Download PART.mw

 

  Hello,

     I have a large module of procedures. A procedure thet I know takes a long time to execute the result. I would like to know at what stage of the procedure the calculation takes time. 

 
 1)  Copy/paste problem .
 
 Looks like Maple is not able to copy/paste the output
 from a summation command . Look at my example .
 I have to use the  " lprint " command .
2)   Mysterious small box character .
 
 Suppose I want to edit a command . I want to replace a character with a left bracket
 (or right bracket or left accolade but strangely not the right accolade).
 I put the cursor on the character and type the left bracket (or right...) .
 The left bracket ( or right ...)  is inserted . Now when I try to delete the character,
 a small box appear . The  character I am trying to delete is shifting to the right .
  Like  I said , just a little annoying .
 
3)  Open file problem .
 
 The first file I open in Maple with the  ctrl-o command , the "open file window" appears in
  the center of the screen . All the others files I am opening , the "open file window"  show up
  in the bottom left corner , top center or top right corner ... randomly .
  Very annoying on a 27" screen . For this last one ,I am not shure  if it is a Maple 2018 problem
   or a Windows 10 64 bits problem . I have few programs in my computer .
  When I use Microsoft Paint or Wordpad ,I don't see this problem .
 
  I don't know if somebody else can confirm those annoying things . If I am not the only one
  then I am hoping the next updates or versions will fix that .
 
    Thanks !
 

Here is the code I've wrote for third order polynomial .

I want to extend it for 100th order polynomial without writing the somehow same things 100 times !

what should I do ?

( I've done same thing in PHP with sprintf , there we could define variables like x{i} = ... , and so we could make a lot of variable with a for loop )

Thanks in advance .

Here is the code in *.mw format :

 

Test1.mw
 

 

with(plottools):with(plots): display(seq(seq(display(polygon([[i,j],[i,j+1],[i+1,j+1],[i+1,j]], color=`if``((j)::odd,ColorTools:-Color=magenta))), textplot([1+.5,j+.5,fprintf("%d",i*j)])),i=1..10), j=1..10),axes=none);

Hello Maple experts:

Using Maple 2018.2.1 on windows, with Physics package version 301.

There is some strange issue in parsing somewhere.  This works

r:='r'; u:='u'; t:='t';theta:='theta';k:='k';
k:=1/25;
pde := diff(u(r,theta,t),t)=k*(diff(u(r,theta,t),r$2) + 1/r*diff(u(r,theta,t),r)+1/r^2*diff(u(r,theta,t),theta$2));
bc1:= eval(diff(u(r,theta,t),r),r=1)=0;
bc2:= u(r,0,t)=0, u(r,Pi,t)=0;
ic := u(r,theta,0)=(r-1/3*r^3)*sin(theta);
sol:=pdsolve([pde, bc1, bc2, ic], u(r, theta, t),HINT = boundedseries(r = [0]));

No problem with the above, pdsolve gives solution. Now if I change k from 1/25 to 1, it gives parsing error in map

k:=1;
pde := diff(u(r,theta,t),t)=k*(diff(u(r,theta,t),r$2) + 1/r*diff(u(r,theta,t),r)+1/r^2*diff(u(r,theta,t),theta$2));
bc1:= eval(diff(u(r,theta,t),r),r=1)=0; 
bc2:= u(r,0,t)=0, u(r,Pi,t)=0;
ic  := u(r,theta,0)=(r-1/3*r^3)*sin(theta);
sol := pdsolve([pde, bc1, bc2, ic], u(r, theta, t),HINT = boundedseries(r = [0]));

Error, (in assuming) invalid input: map expects 2 or more arguments, but received 1

any K value less than one works. 

Now I change K from 1 to 2, the error goes away. But no solution. Which is OK.

Why does the map error shows up when k=1 only? Same error shows up if K is missing all togother, as in

r:='r'; u:='u'; t:='t';theta:='theta';k:='k';
pde := diff(u(r,theta,t),t)=diff(u(r,theta,t),r$2) + 1/r*diff(u(r,theta,t),r)+1/r^2*diff(u(r,theta,t),theta$2);
bc1:= eval(diff(u(r,theta,t),r),r=1)=0; 
bc2:= u(r,0,t)=0, u(r,Pi,t)=0;
ic  := u(r,theta,0)=(r-1/3*r^3)*sin(theta);
sol := pdsolve([pde, bc1, bc2, ic], u(r, theta, t),HINT = boundedseries(r = [0]));

Error, (in assuming) invalid input: map expects 2 or more arguments, but received 1

 

Hi

I want to create a Heaviside function called MyStep() which will behave exactly like the built in Heaviside with one exception: for MyStep(0) it will return 1 instead of undefined.

 

MyStep(t) = 0, 0<t

MyStep(t) = 1, else

 

Thanks

First 707 708 709 710 711 712 713 Last Page 709 of 2218