vv

14092 Reputation

20 Badges

10 years, 85 days

MaplePrimes Activity


These are answers submitted by vv

Note first that A^n can be computed symbolically using LinearAlgebra:-MatrixPower(A,n);
The entries are the Fibonacci numbers, and as Rouben said, it is easy to see that the maximum entry is fibonacci(n+1) at (1,1).
Here is a procedure to compute the inverse Fibonacci numbers.

inversefib:=proc(y::posint)
local n1,n2, s1,s2;
if y=1 then return 'Exact'=2 fi;
n1:=ln( (1/2)*sqrt(5)*y+(1/2)*sqrt(5*y^2+4) )/ln((sqrt(5)+1)/2); # n even
n2:=ln( (1/2)*sqrt(5)*y+(1/2)*sqrt(5*y^2-4) )/ln((sqrt(5)+1)/2); # n odd
s1,s2:=simplify~([n1,n2])[];
if   s1::even then  'Exact'=s1
elif s2::odd  then  'Exact'=s2
else  'Next'= ceil(s1) fi
end proc:

Examples.
inversefib(2019);
    
Next = 18
inversefib(3524578);
     Exact = 33
inversefib(10^12);
     Next = 60

 

 

remove[flatten](member, A, B);

If you want it inplace, use

remove[flatten,inplace](member, A, B);

plot(arctan(x),x=-20..20, 
title=typeset(
H__0,": ", sigma[1]^2=sigma[2]^2, "     ",  
H__1,": ", sigma[1]^2<>sigma[2]^2, "\n", MyTitle)
);

Yes, it seems that

seq(C[i+1]-C[i], i = 1 .. N-1):
does not finish the job.
But,
seq(C[i+1]-i^2, i = 1 .. N-1):
works.
Probably a bug.

 

 

The limit does exist in C.
For a real function it is possible to use

RealDomain:-limit(sqrt(x^2 - 3 *x + 2), x=2, left);
        undefined

Or, execute first
with(RealDomain);

However I'd recommend RealDomain only if the user really does not know (yet) about complex numbers & functions.
(You should know that almost all mathematical functions are defined in C.)

 

 

FC:= proc(n) 
uses plots,plottools;
local a,b,u;
{seq(seq(a/b, a = 0 .. b), b = 1 .. n)};
display(seq(circle([u,1/2/denom(u)^2],1/2/denom(u)^2), u=%)
        ,scaling = constrained, color = blue, size = [800, 800])
end proc:

FC(6);

See also Apollonian circles

print~([a, b]);  means  [print(a), print(b)];

Now, print(a)  prints a (as a side effect) and returns NULL.
The last output is [NULL,NULL]. If you want to eliminate it, use print~([a, b]):  (colon instead of semicolon).

Digits:=150:
A:=Matrix(eval(M,P=0),shape=symmetric):
B:=Matrix(-diff(M,P), shape=symmetric):
E:=LinearAlgebra:-Eigenvalues(A,B):
E1:=Re(E);
E2:=Im(E); # =0
Esorted:=sort(E1);
evalf[15](Esorted[1..15]), evalf[15](Esorted[-15..-1]);

Yes, shape=triangular[upper, unit]  seems to have a serious problem.

The best (partial) workaround is probably

U:= Matrix(Matrix(4,4, shape=triangular[upper, unit], symbol =u), shape=triangular[upper]);

(partial, because the diagonal elements are now assignable.)

s:=solve((hv*hw+lv*lw)/(lv+hv)*(lv+hv) = dw*(lv+hv), hv):
sign(s)*numer(s)/sort(expand((sign(s)*denom(s))),order=plex(hw,dw));
#   Do you think it's worth the effort?

 

solve({seq(a*v + b*u - w)}, {a,b});

(If w is not in the span of u,v, the result is NULL).

 

Replace n:=10^10 by  n:=10.^10

Actually, the problem is about inequalities in solve, in your case

F := 1-(1/2)*t*exp(-(1/2)*t)-exp(-(1/2)*t):
S := solve({F=u, t >=0}, t) assuming u >= 0, u <= 1;

In general, solve is able to manage inequalities only for polynomials (of several variables).
In most other cases, the inequalities are simply ignored. So, here, S = S1, where
S1 := solve({F=u}, t) assuming u >= 0, u <= 1;

 

 

Maple can approximate the integral (you can use evalf), but cannot compute it symbolically because the antiderivative cannot be obtained in termes of Maple functions.
The idea is to use the residue theorem.  In your case:

restart;
f := (a,z) -> z*exp(a*z) / (z^2 + 1)^2:
R:=[singular(f(a,z),z)];
2*Pi*I*add(residue(f(a,z),eq[]), eq=R): simplify(%);

                    R := [{z = -I}, {z = I}]
                         I Pi a sin(a)

(The result is valid for any Jordan curve positively oriented an surrounding the poles).

Find the triangle of minimal area which contains at least  nXYin  points.

 

XY:=ImportMatrix("data.txt",delimiter=" "):

nXY:=op([1,1],XY);

92

(1)

f:=proc(a,b) add(`if`(XY[i,1]/a+XY[i,2]/b-1<0,1,0),i=1..nXY);
end:

amax:=1.; bmax:=4.; M:=100; N:=100;
nXYin:=85; # minimal number of points in the triangle

1.

 

4.

 

100

 

100

 

85

(2)

A:=Matrix( M,N, (i,j) -> `if`(f(i/M*amax, j/N*bmax)<nXYin, 1e30,  i*j)):

a0,b0 := min[index](A) *~ (amax/M, bmax/N);

.5900000000, 2.160000000

(3)

plots:-display(plots:-pointplot(XY), plot(b0*(1-x/a0),x=0..a0));

 

 

 

 

First 57 58 59 60 61 62 63 Last Page 59 of 121