Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@DJJerome1976 Two ways to report bugs:

Method #1: Send mail to Support@maplesoft.com

Method #2: Look up the drop-down menu labeled "More" near the top of this page.  Within that menu select "Submit Software Change Request".

@darkspin1 I assume that when you wrote

v_1'(0)=v_2'(0)=v_1'(1)=v_2'(1)

you really meant

v_1'(0)=v_2'(0)=v_1'(1)=v_2'(1)=0.

Anyway, is there a reason that you insist on a discontinuous solution?  Your problem has a perfectly fine continuous solution where v1, v2, and u are constants:

 u = B/(1+j*B),

v1 = B/(1+j*B),

v2 = 1/(1+j*B).

 

@darkspin1 You have

f(u) = u+1 for u < 0 and u-1 for u>0

and

-v + j*u + f(u) = 0,

that is,

j*u + f(u) = v.

You claim that we can solve this equation for u in terms of v.  That is not correct.  If you plot the graph of v =  j*u + f(u) versus u, you will see that any horizontal line v = c  with -1 < c < +1 intersects the graph in two points.   Therefore there is no unique u corresponding to such a v.

I have not examined the rest of your problem, but the point noted above can explain why your solution is not what you expect it to be.

 

 

Edgardo, I did not mean anything negative with my comments.   On the contrary, I appreciate your immediate response and solution to the issues raised in this thread.  I tested your Maple16_DE_update.mla.zip with Maple 2015 and it works as advertized.  Thanks!

 

Hello Edgardo, what you have done gets around the current bug but it is not perfect.  Normally one expects a real solution to a differential equation with real entries, so it'd be better if there were no "I" in the solution.

Maple 11 did this correctly.  Something went wrong when going from Maple 11 to 16:

 

    |\^/|     Maple 11 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> de := diff(x(t), t$4)+4*diff(x(t), t$2)-4*x(t);
                         / 4      \     / 2      \
                         |d       |     |d       |
                   de := |--- x(t)| + 4 |--- x(t)| - 4 x(t)
                         |  4     |     |  2     |
                         \dt      /     \dt      /

> dsol := dsolve(de);
                                1/2 1/2                        1/2 1/2
dsol := x(t) = _C1 exp((-2 + 2 2   )    t) + _C2 exp(-(-2 + 2 2   )    t)

                       1/2 1/2                      1/2 1/2
     + _C3 sin((2 + 2 2   )    t) + _C4 cos((2 + 2 2   )    t)

> quit

Note the sin and cos.

@darkspin1 Be careful there!  Maple 2015 fails on the homogeneous equation as well:

de := diff(x(t), t$4)+4*diff(x(t), t$2)-4*x(t);

dsol := dsolve(de);

simplify(dsol, size);

We see that the multipliers of _C2 and _C4 are the same!

 

@Markiyan Hirnyk Although minimize() is the easiest method to use, it does not always work.  Try, for instance, changing the population of A from 5 to 8:

minimize(8*abs(x-3)+8*abs(y-7)+2*abs(x-6)+2*abs(y-5)+2*abs(x-5)+2*abs(y-3)+abs(x-1)+abs(y-2)+3*abs(x-7)+3*abs(y-1), x = -infinity .. infinity, y = -infinity .. infinity, location);

     Error, (in minimize/allvalues) to be implemented

Consider the points P = [ a, b ] and Q = [ c, d].  How would you express the taxicab distance between P and Q in terms of a, b, c, d?

Some clarification can help:

Does "center" mean the vertex?

Does "eccentricity" mean the cone's vertex angle?

Are you asking for a right circular cone or a more general cone?

@Christopher2222 Here is what I get.  It looks good me.

@tomleslie That's very nice.  I did not think of applying parse() in this context.  Your construction can be handy for displaying the value of one variable in a title.  I don't quite see how to extend it to more than one variable but with Carl's answer, that's no longer a pressing issue.

Thank you, Carl, for showing me how.  Before I posted, I had tried all sorts of combinations with typeset() but somehow had failed to hit upon your construction.

Actually the somewhat complex animation code that you have presented obscures the main idea behind the formatting of the title for a single frame which is quite simple. Here it is, should others be interested:

plot(0,
  title=typeset(
    theta[1], sprintf(" = %5.3f   ", 1.000),
    theta[2], sprintf(" = %5.3f   ", 0.123),
    theta[3], sprintf(" = %5.3f   ", 3.333)
  )
);

Addendum: The theta[1], theta[2], theta[3] here may be replaced with theta__1, theta__2, theta__3 with almost equal effect.  See  Acer's comment regarding the difference.

 

@Preben Alsholm Thansk.  That's good!  In fact the "cheating" is quite mild if we have a rough idea of the shape of the eigenfunction.  The method does not seem to depend very strongly on the guess for omega.

Let's say we are looking for an eigenfunction that is zero at the interval's midpoint (as well as the end points, as they are specified in the boundary conditions).  Then for the approxinate shape we take a cubic:

y(x)=x*(Pi-x)*(Pi/2-x)

Better yet, since we are looking for a solution with D(y)(0) = 1, we multiply by a factor to make it so:

y(x)=2/Pi^2*x*(Pi-x)*(Pi/2-x)

We expect the solution to be omega2 = 4.  We try guesses as wide-ranging as omega2 = 0.1 or omega2 = 100, and in all cases dsolve() finds the correct solution omega2 = 4.

restart;
de := diff(y(x),x,x) + omega2*y(x) = 0;
bc := y(0)=0, D(y)(0)=1, y(Pi)=0;
dsol := dsolve({de,bc}, numeric, approxsoln=[y(x)=2/Pi^2*x*(Pi-x)*(Pi/2-x), omega2=0.1]);
plots:-odeplot(dsol, scaling=constrained);
dsol(0);
dsol := dsolve({de,bc}, numeric, approxsoln=[y(x)=2/Pi^2*x*(Pi-x)*(Pi/2-x), omega2=100]);
plots:-odeplot(dsol, scaling=constrained);
dsol(0);

 

 

 

@Preben Alsholm Ah, that's good.  Now what is the trick to get the other eigenvalues?  Let's say I want to get the eigenvalue omega=2 or equivalently omega2 = 4.  Do you put in an initial guess somewhere?

 

Hi Preben, I attempted to apply that same method to another eigenvalue problem but it failed:

restart;
de := diff(y(x),x,x) + omega^2 * y(x) = 0;
bc := y(0)=0, D(y)(0)=1, y(Pi)=0;
dsolve({de,bc}, numeric);
    Error, (in dsolve/numeric/bvp) matrix is singular

Is there a way of rescuing the situation?

 

First 85 86 87 88 89 90 91 Last Page 87 of 99