## 7716 Reputation

17 years, 293 days

## How does PDEtoos[declare] work?...

Maple 2018

I don't quite understand the behavior of PDEtools[declare].  My reading of the documentation is that PDEtools[declare](y(t)) tells Maple that y is a function of t, and therefore y(t) is displayed as y and the derivative of y is displayed as yt.  I did not expect other variables to be similarly affected but apparently they are.  For instance, in the worksheet below, why is the derivative of p displayed as ps?

 > restart;

The normal display of derivatives:

 > diff(y(t),t); diff(p(s),s);

Declare  as a function of :

 > PDEtools[declare](y(t));

 > diff(y(t),t);    # this is displayed in subscript notation, as expected diff(p(s),s);    # why is this displayed in subscript notation?

 >

## How to evaluate this integral numericall...

Maple 2018

I an unable to get a numerical result out of this triple integral.  Maple runs forever.  I stopped it after about half an hour:

Int(exp(-a^2-b^2-c^2),
a=b^2/(4*c)..infinity, b=-infinity..infinity, c=0..infinity);
value(%);
evalf(%);

Is there a trick to make it work?

## Easy simplification...

Maple 2018

In the calculation below, A and B both simplify to 1.  Why doesn't A*B simplify to 1?  Tested on Maple 2017 and 2018.

 > restart;
 > A := (1 - cos(s)^2)/sin(s)^2;

 > B := (1 - cos(t)^2)/sin(t)^2;

 > simplify(A); simplify(B);

Why doesn't this simplify to 1?

 > simplify(A*B);

## Simple(?) algebra...

Maple 2017

This may be a frequently asked question but I could not find

it in MaplePrime's archives.

The expression

 > z := (x^(a+1) - x^a)/(x-1);

should simplify to . I don't know how to do that in Maple 2017.

I have tried all sorts of commands and assumption but none

worked.  For instance:

 > simplify(z) assuming x>1, a::posint;

What's the trick?

## How to model a bouncing ball through eve...

Maple

I wish to model the motion of a ball that bounces up and down in a vertical line, and whenever it hits the ground, it bounces back with only a fraction of the collision speed.

We expect that the amplitude of the consecutive bounces to diminish and for all practical purposes the ball to come to a standstill.  It's not difficult to calculate the motion analytically by hand.

However, when I attempted to solve the equation of motion numerically with Maple's dsolve()  and event handling, I ran into a problem.  As the amplitude of the bounces approaches zero, numerical noise sets in and the ball tunnels itself underground!  See the worksheet below.

I don't know how to prevent the ball from going underground.  Any ideas?

 > restart;
 > de := diff(y(t),t,t)=-1;

 > ic := y(0)=1, D(y)(0)=0;

 > Events := [y(t)=0, diff(y(t),t)=-0.5*diff(y(t),t)];

 > dsol := dsolve({de, ic}, numeric,                  events=[Events], range=0..5);

 > plots[odeplot](dsol, thickness=3, color=red);