Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@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.

 

@C_R I have not seen Maple for Screen Readers because it is specific to Windows, which I don't have.  I will give it a try if/when Maplesoft comes up with a Linux version.

@Math-dashti In my worksheet I had changed the symbol "eta" of your textbook's equation (7.1) to "t" because t is easier to type.  Your modified worksheet does not work because it now mixes up t and eta.

The next image of the textbook's page that you have posted, ends with "... can be simplified to the following nonlinear ODE".  The ODEs, which come in the next page, are not shown.  You need to replace the ODEs in my worksheet with those ODEs.

And as you do that, you need to think about what to do with "x" that enters the equations.  You cannot solve the equations and obtain a plot without knowing what x is.  I don't know the context, so I cannot help you there.

@Math-dashti This may be what you want.

restart;

with(plots):

Let's write diff(u(x), x) = f(u(x), v(x)), diff(v(x), x) = g(u(x), v(x)) for the two differential equations.

f := (u,v) -> v;
g := (u,v) -> F__1*u + F__2*u^2;

proc (u, v) options operator, arrow; v end proc

proc (u, v) options operator, arrow; F__1*u+F__2*u^2 end proc

The equilibria:

equilibria := solve({f(u,v)=0, g(u,v)=0}, {u,v});

{u = 0, v = 0}, {u = -F__1/F__2, v = 0}

The differential equations (not needed in this worksheet)

de1 := diff(u(t),t) = f(u(t),v(t));
de2 := diff(v(t),t) = g(u(t),v(t));

diff(u(t), t) = v(t)

diff(v(t), t) = F__1*u(t)+F__2*u(t)^2

The conserved quantity

P := 1/2*F__1*u^2 + 1/3*F__2*u^3 - 1/2*v^2;

(1/2)*F__1*u^2+(1/3)*F__2*u^3-(1/2)*v^2

Let's take F__1 = 1, F__2 = -1NULL

F__1, F__2 := 1, -1;

1, -1

Here are the equilibra now

equilibria;

{u = 0, v = 0}, {u = 1, v = 0}

Plot the phase portrait

p1 := contourplot(P, u=-1.5..2, v=-1.5..1.5, scaling=constrained,
    colorscheme="DivergeRainbow", contours=[seq](x, x=-0.4..0.4,0.1)):

Mark the equilibria:

p2 := pointplot([[0,0],[1,0]], symbol=solidcircle, symbolsize=15, color=black):

Add direction field

p3 := fieldplot([f(u,v), g(u,v)], u=-1.5..2, v=-1.5..1.5,
        arrows=medium, fieldstrength=fixed(0.4), grid=[10,10], labels=["",""]):

Put all pieces together

display(p1,p2,p3, axes=normal);

 

Download phase-portrait.mw

 

@dharr Considering the frequent requests for Adomian polynomials in this forum, your LAD code is can be a great time-saver.  I will certainly refer the readers to it when the occasion comes up.

@dharr Okay, perhaps I am looking at this through the wrong lens.  I had expected the series solution to provide an alternative to a numerical solution.  It looks like that's not the case.

There may be some information content in the series solution but I have a hard time getting my hands on it.  Suppose I am interested in the porous medium equation with the initial condition u(x,0)=exp(−x^2) for which there is no symbolic solution.  What sort of useful information do I get out of the LAD series?

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