Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@escorpsy

restart;

We have seen that the integral

exp(-h*Pi*v*(x+y)/beta) / cosh(Pi*v*(y-x)/beta)^(4+h):
Int(%, y=-infinity..z, x=-infinity..w);

Int(exp(-h*Pi*v*(x+y)/beta)/cosh(Pi*v*(y-x)/beta)^(4+h), y = -infinity .. z, x = -infinity .. w)

may be evaluated in terms of elementary functions when h is a given
negative integer.  In your latest worksheet you ask whether it is possible
to obtain the answer in terms of an unspecified h.

 

That is doubtful.  Consider the much simpler case

int(1/cosh(x)^h, x);

int(1/cosh(x)^h, x)

showing that Maple is unable to obtain an explicit formula for general h.

 

Specifying h as a non-integer does not help either:

int(1/cosh(x)^(7/3), x);

int(1/cosh(x)^(7/3), x)

But when h is an integer, we get an explicit formula:

int(1/cosh(x)^h, x) assuming h::posint;

(Sum((Product(1-1/(-h+2*j+1), j = 0 .. i))*sech(x)^(h-2*i-2)/h, i = 0 .. -ceil(-(1/2)*h)-1))*tanh(x)+2*(Product(1+1/(-h+2*j-1), j = 1 .. -ceil(-(1/2)*h)))*arctan(exp(x))

Unfortunately the result is too complex for evaluating the integral on -infinity, 0.

int(1/cosh(x)^h, x=-infinity..0) assuming h::posint;

limit(-(Sum((Product((h-2*j)/(h-2*j-1), j = 0 .. i))*sech(x)^(h-2*i-2)/h, i = 0 .. -ceil(-(1/2)*h)-1))*tanh(x)-2*(Product((h-2*j)/(h-2*j+1), j = 1 .. -ceil(-(1/2)*h)))*arctan(exp(x))+(1/2)*(Product((h-2*j)/(h-2*j+1), j = 1 .. -ceil(-(1/2)*h)))*Pi, x = -infinity)

Your actual integral is more complex than the simple illustration above,

therefore I wouldn't hold out hope for an explicit formula for its value.

 

Download mw.mw

@mmcdara I pointed out the ambiguity of the definitions of c_1 and c_2, but farazhedayati said that he has reasons for treating xbar as an independent variable, so I just implemented what he is asking.  It's up to him to make sense of the result.

 

@farazhedayati To add the c_2 values, we do

add(c_2(my_x, my_xbar, i), i=1..n);

and we get 1.479074043.

The definition
    c1:=diff(b, xbar);
is ambiguous.  To illustrate that in a very simple case, consider the function f = m + 2*x + 2*y, where m is the mean of x and y.  You ask, what is the derivative of f with respect to m?

Answer #1:  Clearly df/dm = 1.

Answer #2:  By the definition of m we have m = (x+y)/2, therefore x+y=2*m, that is, 2*x+2*y=4*m.  Consequently, f=m+4*m=5*m, and therefore df/dm=5.

Which answer would you accept?

 

This alternative version provides a better demo.

Download stretch-octahedron2.mw

@tomleslie What I was looking for was an asymptotic estimate like the one in dharr's answer.  Nevertheless, thanks for your input and a thumb up for that!

 

@vv Thanks for your observation.  I don't quite see how you did that by hand.  I will have to look at it more closely.

Added later:

Aha! Got it! Here is how it goes.  We are looking at the equation
  [(4n-1)x + (4n+1)]x^{2n} = 1 - x.
Letting z=1-x the equation takes the form
  [8n - (4n-1)z] (1-z)^{2n} = z.
As n grows, x goes to 1, and therefore z goes to 0.
Consequently, the second term in the square brackets
is smaller than the first, so we drop it and arrive at
   8n (1-z)^{2n} = z.

For small values of z we have 1-z =  exp(-z), therefore
  8n exp(-2nz) = z,
which we rearrange into
  2n z exp(2nz) = 16n^2.
Letting 2nz = y this becomes  y exp(y) = 16n^2, whence from
the definition of LambertW we get y = LambertW(16n^2).
Therefore z = 1/(2n) LambertW(16n^2), and finally
  x = 1 -  1/(2n) LambertW(16n^2).
 

@acer Thanks for your comments, and submitting a bug report.

 

@dharr Thanks for your answer and a thumb up!

A curious side note:

Before I posted my question I did exactly what you did, however, in my actual problem I had

eq:=((4*n-1)*x + 4*n + 1)*x^(2*n) = 1 - x;

where the coefficient of every n is twice that in the equation which I posted.

As I was posting the question, I noticed that all coefficients of n are even, therefore I replaced every n by n/2 without trying to run the reduced version through Maple.  Curiously, the calculation with the original version fails:

eq:=((4*n-1)*x + 4*n + 1)*x^(2*n) = 1 - x;
solve(%,x);
asympt(%,n);

Error, (in asympt) unable to compute series

I don't understand why it should work for n but not for 2*n.

 

@permanoon123 In his very first response, tomleslie pointed out that the second derivative with respect to x is written D[1,1] in Maple.  Your D[2] means the first derivative with respect to t, but that's not what you want.

Additionally...

I see that you corrected the sign of the fourth order derivative term relative to your initial post.  At the same time you also changed the sign of the second order derivative term.  That's bad!  The sign of the second order derivative should be positive.

Are you making up random PDEs?  Don't do that!

 

@Chrono1 I have added a simplified front-end to the worksheet which does what you are asking for.  Specifically, the original geodesic_points() expects the initial segment PQ of the geodesic to be specified by (a) the face number in which PQ lies; and (b) the edge numbers in that face on which the points P and Q lie.

Since all edges and faces on a regular polyhedron are equivalent, there is no loss of generality in always taking the line segment PQ on Face 1, and the point P on edge 1 of that face.  Furthermore, instead of specifying the point Q, we may specify the slope of the line PQ relative to edge 1 and let Maple find the point Q.

This alternative way of specifying the segment PQ is implemented in the proc geodesic_points_alt() at the end of the attached worksheet.  See if that meets your needs.

Download cube-ver2.mw

 

@tomleslie Technically there is no justification behind applying a naive finite difference method to solving a PDE with discontinuities.  Anything we get out of that is a "gift" rather than an entitlement.  In this case Maple's finite difference algorithm picks up a reasonable approximation to the exact solution, that is u(x,t)=Heaviside(t - x/4), as we see in the graph below where green and red colors correspond to the exact and approximate solutions, respectively.

I calculated the approximate solution by setting spacestep=0.001 in pdsolve().  A provably good approximation may be obtained through shock-capturing methods, but that's a highly specialized subject.

 

 

@tomleslie There is no requirement of continuity in boundary conditions.  Discontinuous boundary conditions are quite common, and in fact absolutely necessary, in applications of PDEs.  Discontinuous boundary conditions, as well as discontinuous solutions(!) are interpreted in functional analytic setting through what are called generalized derivatives.

Indeed, the boundary value problem posed in this thread may be solved exactly.  The solution is
u(x,t)=Heaviside(t - x/4);
Maple's numeric solver gets a reasonable approximation to this if spacestep is sufficiently fine, as in
sol:= pdsolve(eq1,cond, numeric,time=t,range=0..10,spacestep=0.01);

Plot the exact and approximate solutions together to see how they compare.

And of course u(x,t) is discontinuous at (0,0) so we don't ask of its its value there.

 

 

@nm I trust that you see that the r derivative of u at r=0 should be zero by symmetry. Now look at the general solution (7.9.21) on page 319 in Haberman (I am looking at the 3rd edition). There the r dependence enters as a weighted sum of Bessel functions of all orders.  In particular, the sum includes the Bessel function of order 1 [which is J_1(...) in mathematical notation, BesselJ(1,...) in Maple notation].  But the derivative of J_1 at zero is not zero(!) so if you leave that term in, your solution u will have a nonzero derivative at r=0 which shouldn't be there. The 4th boundary condition that I have supplied gets rid of that term. 

You said you solved that equation by hand. Check to see what you did with the J_1 term.

Edit:

I take back what I have written regarding the extra boundary condition.  I have verified that that boundary condition is automatically satisfied (after dropping the singular Bessel functions as you have noted.)  I was thrown by mixing this up with the case where u depends on the polar angle, and in which case Bessel functions of all orders show up.  In your case only the Bessel function J_0 shows up, which does have zero derivative at the origin, so it's just fine.

 

The boundary conditions are incomplete.  Here I will describe how to correct them, but that doesn't help with the error message which appears to be due to a bug in Maple.

What is the domain of the unknown function u(r,z,t)?   It is
0 < r < 1,    0 < z < 1,   t > 0.

Note that for a fixed t, the domain is a rectangle in the (r,z) plane.  To have a well-posed problem, you need to specify boundary conditions all around that rectangle.  Your bc gives boundary conditions on three of that rectangle's four edges.  A boundary condition on the edge r=0 is missing.  The missing condition is D[1](u)(0,z,t)=0, which follows from the symmetry of u in r.

Thus, the correct boundary conditions are:
bc := u(r,0,t)=0, u(r,1,t)=0, u(1,z,t)=0, D[1](u)(0,z,t)=0;
Other than that, the problem is posed correctly.  Maple should be able to produce a series solution for arbitrary ic := u(r,z,0) = f(r,z).  But it fails even for the simpler ic := u(r,z,0) = 1.

 

First 41 42 43 44 45 46 47 Last Page 43 of 91