Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@acer Oh, I see.  Your previous comment did not quite register with me, but now I see what you mean.  Thanks again for the explanation.

@acer Thanks for pointing out the overrideoption option.  I didn't know about it and I see that it can be useful.

On a related topic, do you know whether it's possible to set linestyle=dash in plottools:-contourplot?  I get solid lines only, no matter what I try, as in:

p1 := contourplot(x^2-y^2, x=-1..1, y=-1..1, linestyle=dash);
display(p1, overrideoption, linestyle=dash);

I don't quite know how to do dashed lines in a contour plot.  Here is how to do with solid lines.

At the end of your file case1.mw, add the two commands:

p1 := plots:-contourplot(func(x,y), x=0.03..0.15, y=0.02..0.1,
    colorbar=false, contours=conts,color="Red");
save(p1, "p1");

This will produce the contour plots and save the result in a file named p1.

Do the same in case2.mw, but replace the two occurrances of p1 with p2, and change "Red" to "Green".

Do the same in case3.mw with p3 and "Blue".

Then start up a fresh Maple worksheet and enter:

read("p1");
read("p2");
read("p3");
plots:-display(p1,p2,p3);
 

@nm Download the file Maple2025.2LinuxX64Upgrade.run from Maplesoft's website, and then in a terminal execute the two commands:

    chmod +x Maple2025.2LinuxX64Upgrade.run
    ./Maple2025.2LinuxX64Upgrade.run

The first command makes the file executable.  The second command executes its instructions.

@Earl Sure, just add a little bump near the center of the top face of the moving block.

@acer That's a nice construction.  The hemisphere may be plotted more efficiently in spherical coordinates.  Then there won't be a need to for an excessively fine grid.

As to your question "is the base circle/edge of his hemisphere ragged" regarding the answer posted by janhardo, the answer is no, it's not jagged in his third version, since the hemisphere is plotted in spherical coordinates.

@janhardo That's a very good, regardless of whether it's done by you or by an AI :-)

@janhardo Yes, but is there a hole on the surface once you set transparency to zero?

I can confirm that the scrollbar's up and down arrows are missing in Maple 2025 (on Linux).  That's a pity

I consider Maple 2025's funky interface altogether a badly misguided experiment.  I am staying with 2024 until the old sensible interface is offered as an alternative in a future release.

@michele In the absence of a worksheet, it's anyone's guess as to what you may have done wrong.  To get a useful feedback, post the worksheet.

Regarding:

    From these, the sphere's radius r and the coordinates of its center can be determined?

Which sphere?  There is no sphere in the question's statement.

Plot the sphere that passes through the point (5,1,4) and intersects the coordinate planes x=0, y=0, z=0 in circles of radii 1, 2, and 3, respectively.

For whatever it's worth, here is the solution of your PDE in the absense of a source terms. 
 

restart;

Bipolar to Cartesian transformation F is defined as

F := (tau,sigma) -> [
        a*sinh(tau)/(cosh(tau)-cos(sigma)),
                a*sin(sigma)/(cosh(tau)-cos(sigma)) ];

proc (tau, sigma) options operator, arrow; [a*sinh(tau)/(cosh(tau)-cos(sigma)), a*sin(sigma)/(cosh(tau)-cos(sigma))] end proc

where a is an arbitrary parameter, and tau = -infinity .. infinity, and sigma = -Pi .. Pi.NULL

The rectangle

Omega = `&x`({`&tau;__1` < tau and tau < `&tau;__2`}, {-Pi < sigma and sigma < Pi})

in the tau, sigma plane is mapped onto the region omegabetween two off-center circles
in the Cartesian plane.

Specifically, the coordinate lines "tau&equiv;"constant map into circles centered
on the x axis in the Cartesian plane, and in particular, the images of the
rectangle's edges tau = `&tau;__1` and tau = `&tau;__2`map to the bounding circles of omega.

 

Let's calculate the radius and center of the circle corresponding to an

arbitrary "tau."

F(tau,  0):  # the x coordinates of where
F(tau, Pi):  # the circle intersects the x axis
simplify(1/2*(%% - %)[1]):
radius := unapply(%, tau);

proc (tau) options operator, arrow; a*csch(tau) end proc

F(tau,  0):  # the x coordinates of where
F(tau, Pi):  # the circle intersects the x axis
simplify(1/2*(%% + %)[1]):
center := unapply(%, tau);

proc (tau) options operator, arrow; a*coth(tau) end proc

We wish to chose the three parameters a, `&tau;__1`, `&tau;__2` so that the inner and outer
boundaries of omega are circles of given radii r and R, and the center of

the inner circle is offset relative to the outer circle by the amount kappa*R.

That results in three equations which we solve for the unknowns

a, `&tau;__1`, `&tau;__2`.  Maple returns a sequence of five solutions, the first four are

not interesting.  We pick the last one.

radius(tau__2) = R,
radius(tau__1) = r,
center(tau__2) - center(tau__1) = kappa*R:
solve({%}, {a, tau__1, tau__2}):
params_general := allvalues(%[-1])[1];

{a = (1/2)*((1/2)*R^2*kappa^3*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))-R^4*kappa^3-(1/2)*R^2*kappa*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))-kappa*r^2*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))+R^4*kappa+R^2*kappa*r^2-(1/2)*r^2*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))/kappa+(1/2)*r^4*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))/(R^2*kappa))/(R*kappa*((1/2)*kappa*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))-R^2*kappa-(1/2)*r^2*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))/(R^2*kappa))), tau__1 = ln(-(1/2)*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))*r/(R^3*kappa*((1/2)*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))/R^2-1))), tau__2 = ln((1/2)*(R^2*kappa^2+R^2-r^2+(R^4*kappa^4-2*R^4*kappa^2-2*R^2*kappa^2*r^2+R^4-2*R^2*r^2+r^4)^(1/2))/(R^2*kappa))}

That's explicit but rather unpleasant.  Let's plug in specific numbers for R, r, kappa:

params := simplify(rationalize(
        subs(R=1, r=1/2, kappa=1/4, params_general)));

{a = (1/8)*105^(1/2), tau__1 = -2*ln(2)+ln(11+105^(1/2)), tau__2 = -3*ln(2)+ln(105^(1/2)+13)}

Now that's not bad.  Let's plot the region to see what omega looks like;

subs(params, F(tau__1, sigma)):
p1 := plot([%[], sigma=-Pi..Pi], scaling=constrained, color=red):
subs(params, F(tau__2, sigma)):
p2 := plot([%[], sigma=-Pi..Pi], scaling=constrained, color=blue):
plots:-display(p1,p2);

We wish to solve Laplace's equation in omega with the boundary conditions u = 0

on the outer circle and u = 1 on the inner circle.  But omega is the image of the

rectangle Omega, and Laplace's equation is invariant under the mapping, therefore

it suffices to solve the equation on the rectangle with boundary conditions

u = 0 on the edge tau = `&tau;__2` and u = 1 on the edge tau = `&tau;__1`, and periodic boundary

conditions on the other two edges.  That's straightforward to solve by hand

and we find that the solution is linear in tau:

tau

U := 1/(tau__1 - tau__2)*(tau - tau__2);

(tau-tau__2)/(tau__1-tau__2)

Here is the graph of the temperature in Cartesian coordinates:

%plot3d([F(tau,sigma)[], U], tau=tau__1..tau__2, sigma=-Pi..Pi,
        shading=zhue, style=patchcontour):
subs(params, %):
value(%);

 

Download heat-equation-in-off-center-annulus.mw

 

@Paras31 I see that your graphs of Short-time behavior are noticeably different from the book's.  That may be due to numerical errors that may have crept in.

The following graphs, plotted using Maple's solution that I had noted in my previous reply, seem to be identical to the book's.

You have w0 and w[0].  Are these supposed to be the same thing?

You have w[0](eta,z).  What is w[0]?

You have w(r,z) := sum(p^i*w[i](r, z), i = 0 .. N); 
This is attempting to define w in terms of w.  Makes no sense.

You have D*w[0](0,z).  I am guessing that the D here is supposed to be the differentiation operator. But w[0] is a function of two variables, so you need to say derivative with respect to which variable.

Conclusion: What you are attempting to do is too complex for a first project in Maple.  You should spend some time learning the basics of the language before attempting this.

 

1 2 3 4 5 6 7 Last Page 1 of 99