Axel Vogt

5821 Reputation

20 Badges

20 years, 223 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

Denote your expression by k.

subs(Pi=pi, k): 
map(identify, %):
evalf[18](%):

Using 'series' gives a false result, 'MultiSeries:-series' however works.

f:= x -> 1/x^(1/3)/(x^2+2*x*cos(phi)+1);
series(f(x), x=-exp(I*phi), 2):  simplify(%); # gives residue=0
MultiSeries:-series(f(x), x=-exp(I*phi), 2); # works
For phi = Pi/2 that results in 1/4*I*(3^(1/2)+I)/(x+I), giving
-.250000000000000+.433012701892220*I
Cross check z:= t -> -I+exp(I*t*Pi*2); is a curve around -I
with correct orientation, chosen for phi = Pi/2 and
'Int(f(z(t))*D(z)(t), t=0..1)/(2*Pi*I)';
eval(%, phi=Pi/2);
evalf[10](%);
-.2500000000+.4330127017*I
'confirms' that

Please upload code, not pictures. It is more easy to copy than to type, no?

 

It is smooth, but very rapidly oscillating. I guess.

You may try to avoid the sclaing factor in front. And increase Digits to 15, at least.

You may use Maple's syntax to formulate your task

f:= x -> x^2+2*x;
solve(f(x+1));

I was playing a bit more with that nice task, Sum(3^(-n)*floor(2^(n+2)/p), n = 1 .. infinity)
and for p=17 that does not evaluate numerically, only after restrichting to 100 terms or so.

The usage of gfun as shown by Markiyan seems to run into troubles as well for increasing p.

Let me consider the problem with 'frac', which is more or less equivalent (one can use gfun
for that as well).

By looking at examples one sees that frac(2^(n+2)/p) has only finitely many values and those
are periodic, in the case p=7 the period was 3.

Now remember Fermat's little theorem: a^(p-1) = 1 modulo p for p a prime number.

Hence 2^(n+2) - 2^(n+2+(q-1)) = 2^(n+2)*(1 - 2^(q-1)) = 0  modulo p. Which means, that all
the rationals frac(2^(n+2)/p) are periodic of period p-1 (there is no zero, since 2 is a unit
modulo p, it is a field).

For p=7 we had a shorter period (p-1)/2, but that is not true in general (p=11).

But that already allows to write down the recursion without using gfun: u(k+p-1)=u(k) and
the (p-1) initial values.

For that rsolve replies in terms, which are difficult to be used in the infinite series
and for p=23 I ran out of memory (and patients).


Thus returned to the idea of splitting the summation.

Write 2+n = (p-1)*k + j. Then j = 2+n modulo (p-1) and k = (n+2 - j)/(p-1).

One can convince oneself, that therefore the following is a re-arragement of the series:

Sum( Sum(3^(-(p-1)*k-j) * L[j],k = 0 .. infinity),j = 1 ..  p-1)

The inner series evaluates to 3^(-j+ p-1)* L[j]/(3^(p-1)-1) and adding p-1 such terms
is quick and without problems, even for larger p. Hence we have

  Sum(3^(-n)*frac(2^(n+2)/p), n = 1 .. infinity) =
  Sum( 3^(-j+ p-1)* L[j]/(3^(p-1)-1), j = 1 ..  p-1)

One only has to provide L:=[seq(frac(2^(n+2)/p), n=1 .. (p-1))].

'diff(ln(cosh(t)),t$15)'; 
`` = convert(%, tanh);

subs(tanh(t)=x, %): factor(%): sort(%);
P:=unapply(rhs(%),x);
plot(P(x), x=-1 .. 1);

Now find the maximum in x = tanh(t), which means to find D(P)(x)=0
and then test for the second derivative.

I get x0 = -RootOf(-929569+50307087*_Z-507350025*_Z^2+2087700615*_Z^3-
4339860525*_Z^4+4838508675*_Z^5-2766889125*_Z^6+638512875*_Z^7,index = 1)^(1/2)

and the maximum as ~ 184543792.966350, x0 ~ -0.15, t0 ~ -.153487305042586.

The derivative of P is irreducible (in terms of x^2), so the root will not be
in more simple form without a good idea.
A function does not have a variable with a specific name, no? Just think of 'sin'.

Perhaps the following helps

  U:= (n,u) -> (D@@n)(u);

  U(2,sin)(x);
                               -sin(x)

Along that line you should find a notation, which is convenient for you.
You mean
5^2 * 5^(1/2) = 5^t; 
solve(%, t);
                                 5/2


why? it already works ... have you looked up "define"?

subs(v(1) = 0, v(0)= 0, %) without brackets would be enough

try to look up "eval" as well

Have you already looked into the help, entering "integration by parts" or similar?

As ThU suggests: plotting is a good idea to get an impression.

And you see, that the graph seems to become quite flat for a region you
may need for a possible solution, it looks like a logarithm.

Using the command 'asympt' you can even verify, that this is the case.

Now switch to exp( fct ) = exp (solution ) and plotting will tell you, that
the problem now is (almost) linear.

For such a situation fsolve has no problems at all and works without
an initial guess

I guess the decimals 0 ... 9 are meant. Here is a hint:

You may try the command StringTools[CharacterFrequencies] after using evalf
for enough decimal places. And you may wish look at the last place with some
care. Perhaps it is a good idea to test with n=4, 5 or 6 decimals.

yes: never hesitate to use search engines

http://www.mapleprimes.com/search/?term=windows%208

And - for any SW product - check supported platforms at the suppliers' pages first

> Sum(cos(2 *Pi* x* b / a), b=0 .. a-1);
> Sum(%, a=1 .. x);
> subs(x=k, %);
> #value(%); simplify(%) assuming a::posint, k::posint:
> #combine(%,trig) assuming a::posint, k::posint;
> G:=unapply(%, k);
You will notice, that G is zero:

G(1); value(%); simplify(%);
G(2); value(%); simplify(%);

[seq(G(j), j=1 .. 5)]; value(%): simplify(%);
                           [0, 0, 0, 0, 0]


One can cancel variable c: write a = A*c, b = B*c. Then c vanishes from the function.

Since c is assumed to be positive one can divide by c for the new constraints and it
will vanish there as well.

Using 'abs' inside the squareroot (I always do that for safety) gives me a solution
which violates the constraints only by ~ 1e-12. Not sure, whether that is devoted to
numerical issues - or whether there is no valid point for the task.

Did it with Minimize (Digits:=15), having not installed Moiseev's optimizer.

g := 3/abs(-1+u^2)^(1/2)*A+B/abs(-1+t^2)^(1/2);

newConstraints:= {0 <= A, 0 <= B, 0 <= t, 0 <= u, t <= .999999, u <= .999999,
 0 <= -1-(t^2-u^2)/(-1+t^2)*B^2+2*B*u, 0 <= 1-A*t-B*u, 0 <= A^2+2*B*u-B^2-1};

Minimize(g, newConstraints);

  [3.99999999999376588,
    [A = .718144353926190, B = .695894468840870,
     t = .718144058135257, u = .695894163592710]]
First 26 27 28 29 30 31 32 Last Page 28 of 92