Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

I am trying to see if Maple can solve Laplace PDE inside the disk in polar coordinates. Standard textbook problem. Radius of disk is `a`. The boundary conditions on the disk is `f(theta)`. One of the conditions needed also is that the solution is finite in the center of the disk.

I do not know how to tell Maple that the solution should be finite in the center of the disk. If I do not give this conditions, Maple gives me strange looking solution, which does not look like anything close to the standard series solution one gets from hand solution. There is not even a series solution.

This is what I tried

restart;
pde:=diff(u(r,theta),r$2)+1/r*diff(u(r,theta),r)+1/r^2*diff(u(r,theta),theta$2)=0;
bc:=u(a,theta)=cos(theta);
sol:=pdsolve([pde,bc],u(r,theta)) assuming r<=a,r>0

Now, how to tell it that `u(0,theta)` is bounded? So that the `ln(r)` solution do not show up? Adding `u(0,theta)<infinity` to the boundary conditions, gives error

restart;
pde:=diff(u(r,theta),r$2)+1/r*diff(u(r,theta),r)+1/r^2*diff(u(r,theta),theta$2)=0;
bc:=u(a,theta)=cos(theta),u(0,theta)<infinity;
sol:=pdsolve([pde,bc],u(r,theta)) assuming r<=a,r>0

The standard solution to this PDE is

Where `c0` and `cn` and `kn` above are found from boundary conditions at $u(a,\theta)$.

How can one get Maple to give the above solution? How to tell it that $u$ is bounded at $r=0$?

 

 

Came across this issue again.  While working within a worksheet, everything seems fine, using commands like imagetools outputing bmp files etc.  I had to, in the the Options->Precision, uncheck limit expression length to 1000000 during my session.  I saved it multiple times, however and unfortunately did not save as seperate versions, so I was left with one file.

The file size ended up being 64Mb.  The problem is trying to load it into Maple, everytime I try to load the worksheet my computer seems to freeze (laptop, 4Gb RAM, windows 7 64 bit, Maple 2017) I check task manager and my javaw.exe file is consuming 3.7Gb of memory!  So that's why it's locking up. 

I've tried multiple times to open the file and utilmately end up pressing and holding the power button to restart my system. 

 

I have a positive function and I'm taking an integral from it. I don't get why Maple computes the integral over a bigger region but not over a subset of it! Here is the integral. Does anyone know what is going wrong?

int(15.91549431*abs(6.100147120*10^6/k[6]-2.027358424*10^6*(1.241833982*k[6]/T[1]+2.)/k[6]+2.002942410*10^6/T[1])*exp(-50.00000000*(1.241833982*k[6]/T[1]-1.5)^2)/(k[6]^2*T[1]^2), T[1] = -.5 .. 0, k[6] = -.5 .. 0, numeric)
int(15.91549431*abs(6.100147120*10^6/k[6]-2.027358424*10^6*(1.241833982*k[6]/T[1]+2.)/k[6]+2.002942410*10^6/T[1])*exp(-50.00000000*(1.241833982*k[6]/T[1]-1.5)^2)/(k[6]^2*T[1]^2), T[1] = -.9 .. 0, k[6] = -.9 .. 0, numeric)

Hi all

I have a special 2*2 block martix like follwing:

 

 

how can i define this by maple?

thanks in advance.

Hello Forum, 

I have a quick question i was hoping someone could help me with. 

Is there a way to put a line though "math" text like below

+8 = +8

to visualize that to values cancels each other out? 

I hope someone can help, i can´t find anything on google

Thanks in advance 
IllIN - 


 

restart

with(PDEtools)

with(plots)

P__r := .71; lambda := 1.0; K__r := 1.0; S__r := .5; m := .5; M := sqrt(10.0); `&varkappa;` := .5; Omega := sqrt(5.0); Gr := 6.0; Gm := 5.0; S__c := .22

PDE := {diff(phi(x, t), t) = (diff(phi(x, t), x, x))/S__c-K__r*phi(x, t)+S__r*(diff(theta(x, t), x, x)), diff(theta(x, t), t) = lambda*(diff(theta(x, t), x, x))/P__r, diff(u(x, t), t) = diff(u(x, t), x, x)-M^2*(u(x, t)-m*w(x, t))/(m^2+1)-u(x, t)/`&varkappa;`-2*Omega^2*w(x, t)+Gr*theta(x, t)+Gm*phi(x, t), diff(w(x, t), t) = diff(w(x, t), x, x)+M^2*(m*u(x, t)-w(x, t))/(m^2+1)-w(x, t)/`&varkappa;`+2*Omega^2*u(x, t)}

{diff(phi(x, t), t) = 4.545454545*(diff(diff(phi(x, t), x), x))-1.0*phi(x, t)+.5*(diff(diff(theta(x, t), x), x)), diff(theta(x, t), t) = 1.408450704*(diff(diff(theta(x, t), x), x)), diff(u(x, t), t) = diff(diff(u(x, t), x), x)-9.999999999*u(x, t)-5.999999996*w(x, t)+6.0*theta(x, t)+5.0*phi(x, t), diff(w(x, t), t) = diff(diff(w(x, t), x), x)+14.00000000*u(x, t)-9.999999999*w(x, t)}

(1)

``

IBC := {phi(0, t) = 1, phi(9, t) = 0, phi(x, 0) = 0, theta(0, t) = 1, theta(9, t) = 0, theta(x, 0) = 0, u(0, t) = t, u(9, t) = 0, u(x, 0) = 0, w(0, t) = 0, w(9, t) = 0, w(x, 0) = 0}

sol := pdsolve(PDE, IBC, numeric, spacestep = 0.1e-1)

_m2167514531200

(2)

p1 := sol:-plot(t = .3, color = red); p2 := sol:-plot(t = .5, color = gold); p3 := sol:-plot(t = .7, color = purple); p4 := sol:-plot(t = 1., color = green); plots[display]({p1, p2, p3, p4})

 

q1, q2, q3, q4 := seq(eval(u(x, t), sol:-value(t = t0, output = listprocedure)), t0 = [.3, .5, .7, 1]); plot([q1, q2, q3, q4], 0 .. 10, color = [red, gold, purple, green])

 

p1 := sol:-plot(t = 1, S__c = .1, color = red); p2 := sol:-plot(t = 1, S__c = .2, color = gold); p3 := sol:-plot(t = 1, S__c = .3, color = purple); p4 := sol:-plot(t = 1, S__c = .4, color = green); plots[display]({p1, p2, p3, p4})

Error, (in plot/options2d) unexpected option: .22 = .1

 

Error, (in plot/options2d) unexpected option: .22 = .2

 

Error, (in plot/options2d) unexpected option: .22 = .3

 

Error, (in plot/options2d) unexpected option: .22 = .4

 

 

q1, q2, q3, q4 := seq(eval(diff(u(0, t), t), sol:-value(t = t0, output = listprocedure)), t0 = [.3, .5, .7, 1]); plot([q1, q2, q3, q4], 0 .. 10, color = [red, gold, purple, green])

Error, (in plot) procedure expected, as range contains no plotting variable

 

``


 

Download pde_baru.mwpde_baru.mw

Dear Prof DRs ,Please see the attachments

how to PLOT PDE IBCS for different  Sc , Pr, Gr, Gm at fixed t? Also for Nusselt (theta prime)  ,skin friction (f double prime)?

Dear all

Is there any one can help me to find  the Maple code to solve these fractioanal equations  using fractional Adams-Bashforth-Moulton method

Doc229.pdf

Thank you very much for helping me.

 

 

 

 

 

 

 

In the package Student[Calculus1], the NewTon-Cotes closed formulas are implemented. But I was thinking if there is any other package of Maple having the open Newton-Cotes Fromulas. I searched and I just saw in Student[NumericalAnalysis] for Quadratures.

The problem, find the general solution of y '' + 4y = t cos (2t).

Maple input:

de:=diff(y(t),t,t)+4*y(t)=t*cos(2*t);
sol:=dsolve(de,y(t));

Maple output:

sin(2*t)*_C2+cos(2*t)*_C1+(1/8)*t^2*sin(2*t)-(1/64)*sin(2*t)+(1/16)*t*cos(2*t)

The odd thing is the inclusion of the term -(1/64)*sin(2*t). It is not incorrect since you can collect this term with sin(2*t)*_C2. Is there a reason why it's there, and how can i remove it without inspecting it? Note that Wolfram doesn't have this extra term.

https://www.wolframalpha.com/input/?i=solve+y%27%27+%2B+4y+%3D+t*cos(2*t)

I attached the worksheet and added a more detailed calculation.

diffeq.mw

 

To restrict the domain of a vector field, I have multiplied a coordinate with a non-real complex number (namely a sqrt(of negative expression)). This does work, as shown in this Maple 2017 worksheet program (below). My question is whether this is the best technique of accomplishing this result, or else how to do it better? Would be interested in suggestions for improvements. Here is my program so far:

restart;
#
with(plots):
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(` Vector Field inside Torus`);
print(` ------- ------- ------- ------- ------- ------- -------`);
print(` Assignment:  `);
print(` In a circular pipe of radius (my2r), water is flowing in the direction `);
print(` of the pipe, with speed (my2r)^2-(mya)^2, where (mya) is the distance  `);
print(` to the axis of the pipe.  `);
print(` Depict the vector field describing the flow if the pipe goes around in `);
print(` the shape of a torus with major radius (my1r).  `);
print(`   `);
print(`   `);
print(`   `);
print(` ------- ------- ------- ------- ------- ------- -------`);
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 1) major radius of torus:`);
#
my1r  := 5;     
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 2) minor radius of torus (pipe radius):`);
#
my2r := 4; 
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 3) definition of torus (polar coordinates):`);
#
c00 := [(my1r+my2r*cos(s))*cos(t),(my1r+my2r*cos(s))*sin(t),my2r*sin(s)];
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 4) 3D plot of solid torus (polar coordinates):`);
#
plot3d({c00},scaling=constrained,color=red);
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 5) 3D plot of wireframe torus (polar coordinates):`);
#
P1 := plot3d({c00},scaling=constrained,style=wireframe);
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 6) implicit definition of torus (cartesian coordinates):`);
#
c01 := (sqrt(x^2+y^2)-my1r)^2+z^2-my2r^2;
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 7) implicit 3D plot of solid torus (cartesian coordinates):`);
#
gx := my1r+my2r; # min and max of each coordinate
#
implicitplot3d(c01,x=-gx..gx,y=-gx..gx,z=-gx..gx,numpoints=9000);
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 8) vector field definition (cartesian coordinates):`);
#
my1vfx := -y;
my1vfy := x;
my1vfz := 0;
#
my1fld := [my1vfx,my1vfy,my1vfz];
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 9) 3D plot of vector field (cartesian coordinates):`);

#
fieldplot3d(my1fld,x=-gx..gx,y=-gx..gx,z=-gx..gx);
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 10) definition of vector field with unit length vectors (cartesian coordinates):`);
#
my1vl := sqrt(my1vfx^2+my1vfy^2+my1vfz^2); # vector length
#
my2fld := [my1vfx/my1vl,my1vfy/my1vl,my1vfz/my1vl];
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 11) 3D plot of vector field with unit length vectors (cartesian coordinates):`);
#
fieldplot3d(my2fld,x=-gx..gx,y=-gx..gx,z=-gx..gx);
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 12) definition of vector field with asked for length vectors (cartesian coordinates):`);
#
mya := sqrt((sqrt(x^2+y^2)-my1r)^2+z^2);
c01r := sqrt(my2r^2-mya^2); # also used for domain restricting vector field below
#
my1tsz := solve([c01],[z]);
#
assign(my1tsz[1][1]);
my1tz := z;
unassign('z');
#
assign(my1tsz[2][1]);
my2tz := z;
unassign('z');
#
my1vp := c01r/my2r; # vector length (maximum one unit)
#
my3fld := [my1vp*my1vfx/my1vl,my1vp*my1vfy/my1vl,my1vp*my1vfz/my1vl];
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 13) 3D plot of vector field with asked for length vectors (cartesian coordinates):`);
#
fieldplot3d(my3fld,x=-gx..gx,y=-gx..gx,z=-gx..gx);
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n(Section 14) same asked for vector field with 3-D arrow vectors:`);
print(`   `);
print(` (to get this to display properly it was necessary to do:  `);
print(` -> Maple 2017 -> Preferences... -> Precision ->   `);
print(`   [unselect] Limit expression length to   `);
print(`   Apply to Session`);
print(`   `);
#
gr := 15;
#
P3 := fieldplot3d(my3fld,x=-gx..gx,y=-gx..gx,z=-gx..gx,arrows=`3-D`,grid=[gr,gr,gr]);
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);
print(`\n display asked for vector field within wireframe torus:`);
#
display([P1,P3]);
#
#
print(` ------- ------- ------- ------- ------- ------- -------`);

Load the Tetrads package, and choose Schwarzshild spacetime:

with(Physics):
with(Tetrads):
Setup(metric = schwarzschild,quiet):

Consider then the following code/output:

expr := D_[~mu](e_[mu,a]);
seq(simplify(SumOverRepeatedIndices(expr             )),a = 1..4);
seq(simplify(SumOverRepeatedIndices(D_[~mu](e_[mu,a]))),a = 1..4);

In my mind, the last two code lines are entirely identical, but their corresponding outputs are certainly not. I don't get it. The above can be compared with the following code/output in which the vierbein indices mu and a have been interchanged:

expr := D_[~mu](e_[a,mu]);
seq(simplify(SumOverRepeatedIndices(expr             )),a = 1..4);
seq(simplify(SumOverRepeatedIndices(D_[~mu](e_[a,mu]))),a = 1..4);

Here, the outputs are identical. The mystery becomes total when realizing that according to Maple, e_[a,mu] and e_[mu,a] are considered completely identical [a notational choice I do not find reassuring].

 

I am having difficulties with a recursive function call with named parameters.

The proc is defind as follows:

Subs:=proc(eqn::seq(equation),elemt::Element,{num::boolean:=false},$) option remember;
...
qs[i]=Subs(eqn,elemt[qs[i]]); # This is where I need to add something like 'num'=num
...
end proc;

My difficulty is with the "num" flag. In the code this flag governs whether to try to evalf() certain results or not. That and the recursion per se all works. What does not work is when I add the num option to the internal call. I have been trying 'num'=num, ''num''=num, "num"=num and `num`=num.  I either get an error that something like true=true is not a valid argument here, or that "num" is not valid.

Any hint?

Thanks,

Mac Dude

Hi. I have an excel data file.

IDEALLY, I want to import the results of the formula in cells C3:C7.

But it doesn't like it. Reports 0's

When I convert the range to result to values in cells D3:D7 it imports no problem. But I don't want to do this step.

any ideas?

Book1.xls

import.mw

 

 

 

HOW I can find the function that satisfies these boundary conditions?

please help me.

Thanks

FUNCTION.mw

Download FUNCTION.mw

 

equation of ellipse

eqn := (1/32)*(x-16)^2+(1/2025)*(y+0)^2 = 1

only interested in the positive section

plots[implicitplot]([(1/32)*(x-16)^2+(1/2025)*(y+0)^2 = 1], x = 0 .. 18, y = 0 .. 60, scaling = constrained)

equation for arch length of function

int(sqrt(1+(diff(eqn, x))^2), x = 0 .. 16)

Doesn't seem like the best way to solve this.

Wanting to generate a general fomula I can then use in excel to calculate the arch length of the positive only section of the ellipse

any ideas of what the assumptions could be to have maple solve this?

 

eqn2 := (x-h)^2/a^2+(y-k)^2/b^2 = 1;
                               2          2    
                        (x - h)    (y - k)     
                eqn2 := -------- + -------- = 1
                            2          2       
                           a          b        
                             "(->)"

     [[                                            (1/2)]  
     [[          / 2  2    2  2      2        2  2\     ]  
     [[    a k + \a  b  - b  h  + 2 b  h x - b  x /     ]  
     [[y = ---------------------------------------------], 
     [[                          a                      ]  

       [                                            (1/2)]]
       [          / 2  2    2  2      2        2  2\     ]]
       [    a k - \a  b  - b  h  + 2 b  h x - b  x /     ]]
       [y = ---------------------------------------------]]
       [                          a                      ]]

eqn3 := (a*k+sqrt(a^2*b^2-b^2*h^2+2*b^2*h*x-b^2*x^2))/a;
                                                     (1/2)
                   / 2  2    2  2      2        2  2\     
             a k + \a  b  - b  h  + 2 b  h x - b  x /     
     eqn3 := ---------------------------------------------
                                   a                      
diff(eqn3, x);
                           2        2                
                        2 b  h - 2 b  x              
          -------------------------------------------
                                              (1/2)  
            / 2  2    2  2      2        2  2\       
          2 \a  b  - b  h  + 2 b  h x - b  x /      a
`assuming`([int(sqrt(1+(diff(eqn3, x))^2), x = c .. d)], [a > 0, b > 0, c >= 0, d > c]);
 

First 17 18 19 20 21 22 23 Last Page 19 of 40