mmcdara

3437 Reputation

16 Badges

5 years, 227 days

MaplePrimes Activity


These are questions asked by mmcdara

(Maple 2015)

Why is m1(t) not evaluated correctly when I use a compound condition?

restart:
m2(t) = piecewise(x1(t) < c and v1(t) < 0, 1,  0);
       m2(t) = piecewise(x1(t) < e2 and v1(t) < 0, 1, 0)

m1(t) = piecewise(x1(t) = c and v1(t) > 0, 0,  1);
                           m1(t) = 1

This doesn't happen for simple conditions
 

m2(t) = piecewise(x1(t) < c, 1,  0);
m1(t) = piecewise(x1(t) = c, 0,  1);
               m2(t) = piecewise(x1(t) < c, 1, 0)
               m1(t) = piecewise(x1(t) = c, 0, 1)

TIA

Sorry to bother moderators again but a question from @panke has just disappeared.
I browsed its old questions but found none in a recent past related to the one removed.
Can you please tell me where it has been moved ?

TIA

PS: I understand perfectly the need to avoid multiple occurrences of a same thread, but in case of the displacement of a question, couldn't a systematic message be sent?

I was developping an answer to @jennierubyjane  but the question disappeared meanwhile.

Here is the answer hopping for someone to restore the initial question (if it still matters?).
To  @jennierubyjane : comments and advices are in Maple 1D font within your original worksheet.

EDITED : Answer has been displaced here  233262-How-Do-I-Solve-Error-in-Dsolvenumericbvpconvertsys

I want to compute the series expansion of i3_r wrt (x, y, z) at point (x=y=z=0):

i2   := (x,y) -> -(1/2)*I*(exp(I*x)*(sin(x)/x)-exp(I*y)*(sin(y)/y))/(x-y):
i3_r := -(1/2)*I*(i2(y,z)-i2(y,x))/(z-x);

My first attempt was to compute this mulltiple series expansion this way:

ordre := 3:
sx := convert( series(i3_r, x, ordre), polynom);
sy := convert( series(sx  , y, ordre), polynom);
sz := convert( series(sy  , z, ordre), polynom);

But this gives me sy=sz=0 whatever the expansion order.

I then do this:

sx :=              convert(series(i3_r , x, ordre), polynom):
sy := add(map(u -> convert(series(u    , y, ordre), polynom), [op(expand(sx))])):
sz := add(map(u -> convert(series(u    , z, ordre), polynom), [op(expand(sy))]));

and obtained non zero results for both sy and sz (but are they are correct ?).

Could you explain me what happens and tell me how to find the series expansion of i3_r wrt (x, y, z) ?

TIA

In the code above expression #1 contains the term D(Phi)(X): how can I replace the "abstract" function Phi by a "specific" one  phi = k*X(t) ?

restart:
alias(X = X(t)):
alias(Phi=Phi(X(t))):
kin := 1/2*M*diff(X, t)^2 + 1/2*m*diff(Phi, t)^2;  #1

# attempt to replace Phi by phi=k*X(t))
alias(phi=k*X(t)):
eval(kin, Phi=phi);                                #2 ... I expected phi would replace Phi

The attached file  How_to_eval.mw contains a more detailed explanation and a more general situation.

Thanks in advance

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