## Why Doesn't This Substitution Work using subs or e...

I have the expression:

This works (Ans. 144):

coeff(144*D^10,D,op(2,op(2,144*D^10)));

This works (Ans. 144):

coeff(op(3,did),D,op(2,op(2,op(3,did))));

Why doesn't this work?

eval(coeff(op(i,did),D,op(2,op(2,op(i,did)))),i=3);

Why doesn't this work?

subs(i=3,coeff(op(i,did),D,op(2,op(2,op(i,did)))));

I need those "generic" substituions for certain loops that I am making.

Thank you!

mapleatha

## How Do We Make Maple give sin(2nPi) = 0?...

I would like to have Maple give me sin(2nPi) = 0 assuming that n is a positive integer. Is there a way to do it?

Thank you.
mapleatha.

## simplification ...

I have this two expresions

e1 := (1/2)*P[psi]^2/(cos(&vartheta;)^2*Ix)

e2 := (1/2)*P[psi]^2/(cos(&vartheta;)^2*Ix)

simplify(e1-e2)=-(1/2)*(-P[psi]^2+P[psi]^2)/(cos(&vartheta;)^2*Ix)

but

simplify(-P[psi]^2+P[psi]^2)

is zero

why i dont obtain zero if i use simplify(e1-e2) ??

## Egyptian Fractions...

Hello Maple community and others,

It has been proven that every positive
rational number can be represented in
Egyptian Fraction form

We have the fact that the harmonic series diverges
Let Hn = 1 + 1/2 + 1/3 + ... + 1/n.

Then the limit as n goes to infinity of Hn is unbounded.

It seems these two facts go hand in hand.

Is there a procedure in Maple that will give
Egyptian Fraction representation of an arbitrary
rational number?

I made a worksheet with some examples.

egyptian_fractions.mw

egyptian_fractions.pdf

Regards,
Matt

## Multiply Quaternions...

Hello again,   I'm trying to write a procedure to multiply quaternions.   We know that they can be represented as a vector of length 4.   See Wikipedia.   My try  -

qaa=[8,4,6,2] and qab =[2,,4,6,8]
mult:=proc(a,b)

end proc;

maybe needs some looping or data from a table.

Regards,

Matt

## What is the best curve fit for Primes of the form ...

Hi all,

We want to find a curve fit for an integer sequence.

We have n such that n^2+n+17 is a prime number.

Use the Maple CurveFitting package.

I tried with(CurveFitting).

We do not know if this is best represented by a polynomial or exponential curve fit.

n2_and_n_and_17_in_OEIS_007635.mw

n2_and_n_and_17_in_OEIS_007635.pdf

Regards,

Matt

## What Happened to the Old Low-level Command "RTABLE...

The low-level command is "RTABLE". I have used it a million times. I use it with Maple 13 to replace expressions by tables.
For example,

print(Hello! *RTABLE(1,x^2+y^2));

will print: Hello! x^2+y^2. However, the main reason I am using it is to avoid Maple messing up the order of things like sums,
products, etc. However, this command has disappeared. It does not exist in Maple 2020. So, I cannot run my programs at the university which now has Maple 2020. Anybody knows if this command can still be used in another form the same way?

Thank you!
mapleatha

## How Does Maple Actually Solve an Identity, Say, fo...

Since I am a mathematician, I am wondering how Maple goes about solving an identity for 3 functions.
Let's say we have af1(t)+bf_2(t)+cf_3(t) = 0 for all t. How does maple actually find a triplet a,b,c that works for all real t?
It does with solve(identity( ),[a,b,c]). But what is the theory behind it?
We know, of course, a priori, that such a triplet exists.

Thank you!

mapleatha

## How to make a recursion return a symbolic output...

Please refer to this for the definition(s):

http://www.mrob.com/pub/math/largenum-3.html#hyper

The hy(a,n,b) recursion turns  into the following Maple code:

Unfortunately this code depends on x and y being explicit numeric values (x,y \in N), otherwise the recursion crashes (if I ask for example H(2,x,y) or H(2, x, 2))

Is there any way to transform the code so that the final construct can be shown symbolically?

I don't see anything obvious, especially since if y is not a specific natural number the recursion will crash. Can we maybe force Maple to not evaluate it for natural number arguments and return the final construct as either a sum, product or tower of the symbols for x and y (i.e. symbols of the digits of x and y like a tower of 2's 3's, etc)?

I do remember something about putting primes around functions prevents premature evaluation, but in this case it doesn't do anything like I'd want. This definition is not primitive recursive (like that of the Ackerman function), so I don't expect it to be able to be called abstractly (H(2,x,y) or something else such), but maybe we can turn it into something that shows the structure of the final construct as symbols of the digits of x and y?

Thanks.

Yannis

PS: One can improve the situation a bit, by implementing the extended definition as:

hy := proc (n, x, y) if n = 0 then y+1 elif n = 1 then x+y else if y = 1 then x else if n = 2 then x*y elif n = 3 then x^y elif n = 4 then x^hy(4, x, y-1) else hy(n-1, x, hy(n, x, y-1)) end if end if end if end proc

(which can be called abstractly for n=0,1,2,3,4 (hy(n,x,m) for natural m), but for higher n it crashes similar to H, since the definition falls back to the previous if n>4.

## How do I place parentheses around an automatically...

There are some answers up here, but they are for given known functions.
I need to place parentheses around functions that are automatically created.
For example, the function $f(x)$ takes many polynomial values during the execution
of a procedure. For examplle, it takes the values, 2x-1, x^2+3x+2, x^3-2x-3, etc.
How do I automatically place parentheses around these polynomials?
Thank you!
mapleatha

## Why dodsn't it plot x^(1/3) for x negative?...

Why doesn't Maple 13 plot x^(1/3) for x negative?

Thank you.

mapleatha

## why this proc dose't work proper ?...

I use "cat" to concatinate greek letters but the output is not correct.test_cat.mw

 >
 >
 (1)
 >
 >

## why "plotsetup" parameter plotoutput= dose't work...

I use WINDOW 10

for j from 1 to 3 do
pout := cat("C:/Users/Eli/Documents/Animation/", "file", j, ".bmp"):
print(pout):
plotsetup(bmp, plotoutput = pout):
# plot (...)
od:

## dsolve and event syntax ...

I have 2   equations that must be zero, and 2 ODE's for phi and theta

Vector(2, {(1) = &varphi;(tau)-1.5*sin(&vartheta;(tau)), (2) = -&varphi;(tau)^2+1.5*cos(&vartheta;(tau))})

how can i implement this quations with event statment .  this dose't work

event1 := [[and(gln[1], gln[2]), halt]]