## SEEMOUS 2017

by: Maple

Here is a problem from SEEMOUS 2017 (South Eastern European Mathematical Olympiad for University Students)
which Maple can solve (with a little help).

For k a fixed nonnegative integer, compute:

Sum( binomial(i,k) * ( exp(1) - Sum(1/j!, j=0..i) ), i=k..infinity );

(It is the last one, theoretically the most difficult.)

## Print nothing when using a procedure...

**I am trying write a procedure (bit(n,k)) that print all the binary sequences with 2 following conditions:
- Each of the sequences has the length of 'n'. (n elements)
- k bits of n elements have the value 1. (all the remains have the value 0)
Example: bit(3,2) and the result is ((101),(110),(011)).
**My code:
bit := proc (n, k)
local one, index, i, d;
global A;
one := 0;
index := 1;
A := [seq(0, i = 1 .. n)];
d := proc (index)
if one = k or index = n+1 then return NULL; end if;
for i from 0 to 1 do
A[index] := i;
if i = 1 then one := one+1; end if;
if one = k then print(op(A)); end if;
d(index+1);
if i = 1 then one := one-1; A[index] := 0; end if;
end do;
end proc;
d(1);
end proc;
>bit(5,1);
result:
0, 0, 0, 0, 1
That 's not the answer for the excercise. What is the problem?

## How do I solve a simple line integral in Maple?...

Hello there. I have to solve a simple line integral (3*y-x)dL from A(2;1) to B(3;-1). A and B are points in the line described by function y=5-2x. I found a function LineInt. Using paramether Line I wrote LineInt(3*y-x, Line(<2, 1>, <3, -1>)), it doesn't work with error below:

Error, (in Line:-ModuleCopy) invalid input: invalid specification of line

It seems that the problem is with first argument, that is the equation under the integral sign. Or no... How to write it properly? Thanks.

## Simple Integral of Product Gives Wrong Results...

Hello,

I've got the following problem: Sometimes when I let Maple compute an integral it gives a result which is much smaller than it should be. This happens even for rather simple integrals such as the product of a Gauss function and a 1/x-type function. Here's a minimal working example:

restart;
with(plots):
f := x -> exp(-x^2):
g := (x,a) -> 1/(1+abs(x-a)):
plot([f(x),g(x,3)],x=-3..10):
for a from 1 to 100 do
A[a] := int(f(x)*g(x,a),x=-infinity..a-1)
end do:
B:=[seq(A[a],a=1..100)]:
X:=[seq(a,a=1..100)]:
plot(X,B);

The plot it returns looks like this:

which is clearly wrong between around a=35 and a=60...

Does anyone have an idea how this can be repaired?

## Maple TA 2016: Lists depopulate in adaptive questi...

I am currently working on an adaptive question in Maple TA 2016 and it seems that there is a bug in the drop - down list functionality:

After I click "Verify" in a section, the answer disappears even though I choose it to be displayed. The window simply goes back to showing (Click for List) instead of keeping the answer, see the screenshot below.

Perhaps I am doing something wrong, though I have used Lists extensively in the previous version and never had that problem ..

Thanks for your  help!

Elisabeth

## ODE boundary value problem ...

It is known that ODE boundary value problem is similar to the problem of solving systems of nonlinear equations. Equations are the boundary conditions, and the variables are the values of the initial data.
For example:

y '' = f (x, y, y '), 0 <= x <= 1,

y (0) = Y0, y (1) = Y1;

Where y (1) = Y1 is the equation, and Z0 is variable, (y '(0) = Z0).

solve () and fsolve () are not directly suitable for such tasks. Directly should work the package of optimization in relation to a system of nonlinear equations. (Perhaps it has already been implemented in Maple.)
Personally, I am very small and unprofessional know Maple and cannot do it. Maybe there is someone who would be interested, and it will try to implement this approach to solving ODE boundary value problems?

## Problem with differential operator...

hi.please see attached file below and help me.one problem is apply differential operator on matrix and then caclute 3D integral?

maple2.mw

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

## Float(undefined) as integral value...

hi.i am a problem with calculate numeric integral.

thanks

## Numerical solution for the N-body problem with...

Maple

Some Maple 18 short (and I believe elegant) code for doing gravitational simulations with N bodies in space:

N_body_problem.mw

Initial velocities have been tweaked to keep the system stable for the duration of the animation.

Please feel free to fiddle with its parameters, velocities and positions and/or N itself, to produce more interesting animations or re-use the code therein (You can safely ignore the (c), it's there just for archiving purposes).

The following are animations from three runs with N=4, N=3 and N=2, no other parameters changed.

## The "Happy Ages" problem...

This is not actually a question, but an interesting problem found in the recent book (2nd edition, 2015):
Mathematica®: A Problem-Centered Approach
by  Hazrat Roozbeh
Springer

I hope that you will enjoy the problem too.

Define the functions f, h : N --> N by
f(n) = the sum of the squares of the digits of n; e.g. f(25) = 2^2 + 5^2 = 29.
h(n) = min {f(n), f(f(n)), f(f(f(n))), ... };  e.g. h(7)  = min{49,97,130,10,1} = 1.

A natural number n is happy if h(n) = 1.
Find all the happy ages, i.e., happy numbers up to 100.
Conclude that happy ages are mostly before one gets a job or after retirement!

## Sliding ellipse problem ...

Has anyone solved this problem from an older Putnam paper?

An ellipse sitting in the first quadrant with its major axis parallel to the x axis is tangent to the positive x and y axes.

It slides clockwise within the first quadrant while maintaining tangency to both positive axes until its major axis is parallel to the y axis.

Prove that the locus of its centre is the arc of a circle.

I have crudely animated this motion by sliding the axes around the stationary ellipse. Is there a more elegant animation which slides the ellipse against stationary axes?

## Problem with plot ...

The plot command outputs a graph of symbols where the line is made up of "H"s, vertical lines on the axes are "+"s, horizontal lines on the axes are "-"s, and intercepts are "*"s.

How do I fix this problem so that the graph displays a graph normally?

## Social Golfer Problem...

Social Golfer Problem

So we have 8 golfers : 2 golfers per group and 4 groups.Over several golfing days, how can they be arranged so no golfer plays with the same player twice.

turns out they can play for 7 days.

So my attempt in maple....golfing.mw

For 3 players per group and 4 groups this is the arrangement over 4 days:

(these was done in wolfram demonstrations project but the code appears to be obfuscated)

## Mapleprimes updates and spam

Why hasn't mapleprimes yet been able to solve the spam problem.  There was never this long a problem with Mapleprimes 1, every morning I find spam for the last few weeks.

Also the timing still has yet to be fixed.  After 1 hour the times for when a post was made goes back to 0 minutes ago.