Rouben Rostamian

MaplePrimes Activity

These are questions asked by Rouben Rostamian

I expect this proc to return a matrix of all ones but it returns a matrix of all zeros.  Why does it do that?

doit := proc()  
  local i, j, M;                                     
  M := Matrix(3,3);                    
  for i from 1 to 3 do  
    for j from 1 to 3 do  
      M[i][j] := 1;                                      
    end do;                             
  end do;              
  return M;  
end proc:                                           

                                 [0    0    0]
                                 [           ]
                                 [0    0    0]
                                 [           ]
                                 [0    0    0]


We solve Laplace's equation in the domain a < r and r < b, c < t and t < d
in polar coordinates subject to prescribed Dirichlet data.

Maple produces a solution in the form of an infinite sum,
but that solution fails to satisfy the boundary condition
on the domain's outer arc.  Is this a bug or am I missing



`Maple 2019.1, X86 64 LINUX, May 21 2019, Build ID 1399874`


pde := diff(u(r,t),r,r) + diff(u(r,t),r)/r + diff(u(r,t),t,t)/r^2 = 0;

diff(diff(u(r, t), r), r)+(diff(u(r, t), r))/r+(diff(diff(u(r, t), t), t))/r^2 = 0

a, b, c, d := 1, 2, Pi/6, Pi/2;

1, 2, (1/6)*Pi, (1/2)*Pi

bc := u(r,c)=c, u(r,d)=0, u(a,t)=0, u(b,t)=t;

u(r, (1/6)*Pi) = (1/6)*Pi, u(r, (1/2)*Pi) = 0, u(1, t) = 0, u(2, t) = t

We plot the boundary data on the domain's outer arc:

p1 := plots:-spacecurve([b*cos(t), b*sin(t), t], t=c..d, color=red, thickness=5);

Solve the PDE:

pdsol := pdsolve({pde, bc});

u(r, t) = Sum((1/6)*cos(3*signum(n1-1/4)*(-1+4*n1)*t)*(2*Pi*sin((1/2)*signum(n1-1/4)*Pi)*abs(n1-1/4)-6*Pi*sin((3/2)*signum(n1-1/4)*Pi)*abs(n1-1/4)+cos((3/2)*signum(n1-1/4)*Pi)-cos((1/2)*signum(n1-1/4)*Pi))*signum(n1-1/4)*8^(signum(n1-1/4)*(4*n1+1))*(r^((-3+12*n1)*signum(n1-1/4))-r^((3-12*n1)*signum(n1-1/4)))/(abs(n1-1/4)*Pi*(-1+4*n1)*(16777216^(signum(n1-1/4)*n1)-64^signum(n1-1/4))), n1 = 0 .. infinity)+Sum(-(1/3)*((-1)^n-1)*sin(n*Pi*ln(r)/ln(2))*(exp((1/6)*Pi*n*(Pi+6*t)/ln(2))-exp((1/6)*Pi*n*(7*Pi-6*t)/ln(2)))/(n*(exp((1/3)*n*Pi^2/ln(2))-exp(n*Pi^2/ln(2)))), n = 1 .. infinity)

Truncate the infinite sum at 20 terms, and plot the result:

eval(rhs(pdsol), infinity=20):
p2 := plot3d([r*cos(t), r*sin(t), %], r=a..b, t=c..d);

Here is the combined plot of the solution and the boundary condition.
We see that the proposed solution completely misses the boundary condition.

plots:-display([p1,p2], orientation=[25,72,0]);



I am interested in the root of the equation ((2*n-1)*x + 2*n + 1)*x^n = 1 - x, where 0 < x < 1 and n is a large positive integer.  I believe that the root converges to 1 as n goes to infinity.  How does one obtain an asymptotic estimate of the root for large n?


I don't know how to simplify the expression A/B in the worksheet below.  I know that it should simplify to exp(I*Pi/3).  How do I lead Maple to discover that result without telling it the solution ahead of the time?  All variables other than A and B are real.


local gamma:

A := I*sqrt(3) + 2*c*exp(I*(gamma+(1/3)*Pi)) + 2*a*exp(I*alpha) - 2*a*exp(I*(alpha+(1/3)*Pi)) - 2*b*exp(I*beta) - 1;


B := I*sqrt(3) - 2*a*exp(I*(alpha+(1/3)*Pi)) - 2*b*exp(I*beta) + 2*b*exp(I*(beta+(1/3)*Pi)) + 2*c*exp(I*gamma) + 1;


How to show that A/B = e^((1/3)*i*Pi)?



This is from the documentation of ?plot3d,light:


light=[phi, theta, r, g, b]

    This option adds [my emphasis] a directed light source

    from the direction phi, theta in spherical coordinates.


The "adds" in that sentence seems to imply that

multiple light sources are possible, but it does not seem

to work that way.  Each subsequent light option overrides

the previous one as we see in the following illustration

where we render a ball three times by illuminating it

(a) from the north, (b) from the south, and (c) from

both the north and south.  In (c) Maple accounts for only

the south light.


with(plots): with(plottools):

ball := sphere(1, style=surface, color=gold):

    display(ball,light=[0,0,1,1,1])   |
    display(ball,light=[180,0,1,1,1]) |
    display(ball,light=[0,0,1,1,1], light=[180,0,1,1,1])




First 6 7 8 9 10 11 12 Page 8 of 15