vv

13837 Reputation

20 Badges

9 years, 319 days

MaplePrimes Activity


These are answers submitted by vv

Use a simple (linear) change of variables.

J:=2*Int((1/16)*(((1/2)*sin(theta2)*((cos(theta2)+1)*(1+cos(theta1))*cos(phi2*s)+sin(theta2)*sin(theta1))*sin(theta1)/((cos(theta2)+1)*(1+cos(theta1))*(sin(theta1)*sin(theta2)*cos(phi2*s)+cos(theta2)*cos(theta1)+1))))*sin(theta1)*sin(theta2)/Pi^2 * phi2, 
[s = 0 .. 1, phi2 = 0 .. Pi, theta2 = 0 .. Pi, theta1 = 0 .. Pi], method = _CubaCuhre, epsilon = 1e-5):  
evalf(J);
                       0.125000567251692

 

You must read about how GF(p^k) is represented (e.g. https://en.wikipedia.org/wiki/Finite_field).
If P is an irreducible  polynomial of degree k then a representation for GF(p^k)  is Zp[X] / (P) (i.e. a quotient ring which is actually a field).
So, an irreducible polynomial of degree 4 is needed in your case. For example

G16 := GF(2, 4, 1+x+x^4);

The elements of G16 will depend on this P (but obviously any two G16's will be isomorphic).

You are missing a multiplication sign (* or space) after V[0] and also after a,b,c.
You will need numerical values at least for a,b,c; otherwise the denominator will have to be factored simbolically e.g. with PolynomialTools:-Split and the final result will be huge and probably useless.

 

You have used square brackets [...]  in eqn1. Replace them with (...)  because [...]  are reserved for lists.

P.S. Spor la treabă!

The best thing is to eliminate yourself the extra vectors due to inherent roundoff errors.
(all vectors after an almost-null one are not reliable).

GS_sel := proc(GS,eps:=1e-7)
  local zer:=false, s;
  s:=proc(v) if zer then NULL elif LinearAlgebra:-Norm(v)>eps then v else zer:=true; NULL fi end;
  map(s,GS)
end:

GS_sel(GramSchmidt([b, c, d, e, a]));

Just add

dsolve({ entries(de, nolist), x__1(0)=0, x__2(0)=10, D(x__1)(0)=0, D(x__2)(0)=0 }) ;

Note that I have included initial conditions for derivatives, otherwise two arbitrary constants appear.

The minimal correction would be to replace both rand(1..6);  with rand(1..6)();
That's because rand(1..6)  is a procedure and must be called to produce a random number in the interval 1..6.

It will work, but this way each time you call it, the two procedures are created and then called.
A more efficient way is to define

dice := rand(1..6), rand(1..6);   # or better  rand(1..6) $2

Now dice is no longer a procedure but acts exactly the same, i.e. 
dice() ;
       6, 4

 

 

Try this one

COEFF:=(f, z) -> `if`(has(z,`&*`), coeff(args), coeff(eval(f,`&*`=0),z,_rest));

 

subsindets(p, [0,algebraic], u -> NULL);

You have an inequality in the system, so the variables will be assumed to be real.
Your system is hence polynomial and Maple should use SolveTools:-SemiAlgebraic, which usually gives correct answers.
Unfortunately, due to the presence of abs, the system is not recognized as polynomial.
So, use simplify first.
 

eq:=[a>0,b*d*(abs(c)^2-abs(a)^2) = 0, -a*c*(abs(b)^2-abs(d)^2) = 0, -abs(b)^2*a*d+abs(d)^2*b*c = 0, abs(c)^2*a*d-abs(a)^2*b*c = 0]:
eq1:=simplify(eq) assuming real:
solve(eq1);

{b = -d, c = -a, 0 < a, d < 0}, {b = 0, c = 0, d = d, 0 < a}, {b = d, c = a, 0 < a, d < 0}, {b = 0, d = 0, 0 < a, c < -a}, {b = 0, c = -a, d = 0, 0 < a}, {b = 0, d = 0, 0 < a, c < 0, -a < c}, {c = 0, d = 0, 0 < a, b < 0}, {c = 0, d = 0, 0 < a, 0 < b}, {b = 0, d = 0, 0 < a, 0 < c, c < a}, {b = 0, c = a, d = 0, 0 < a}, {b = 0, d = 0, 0 < a, a < c}, {b = -d, c = -a, 0 < a, 0 < d}, {b = d, c = a, 0 < a, 0 < d}

 

Replace vector with Vector.
(vector is deprecated).
If you insist with vector then change the last line from out to eval(out).

P.S. base should be close to 1 (e.g. base=1.01), otherwise the sequence increases too fast.

evalb checks syntactically and does not simplify, see ?evalb.  Use

is(a * conjugate(a) = abs(a) ^ 2);
or                            
evalb(simplify(a * conjugate(a) = abs(a) ^ 2));
 

 

It seems to be a bug and Maple enters an infinite loop.
Execute
infolevel[`mod`]:=2;
and see the messages.

Edit. But it might just working hard. Maxima also fails.
Where have you obtained a factorization?

 

Here is the answer for the Hausdorff measure (corresponds to the length).

Unfortunately Maple reveals some bugs for symbolic integration!

 

 

restart;

dS:=sqrt(a^2*sin(t)^2+b^2*cos(t)^2):
S :=(t1,t2) -> Int( dS, t=t1..t2 ):

Mean:= (t1,t2) -> Int( sqrt(a^2*cos(t)^2+b^2*sin(t)^2)*dS, t=t1..t2 )/S(t1,t2):

 

Examples

 

### 1 ###
ans:=eval(Mean(0,Pi), [a=2,b=1]);

(Int((4*cos(t)^2+sin(t)^2)^(1/2)*(4*sin(t)^2+cos(t)^2)^(1/2), t = 0 .. Pi))/(Int((4*sin(t)^2+cos(t)^2)^(1/2), t = 0 .. Pi))

(1)

simplify(value(ans));  # Maple bug

0

(2)

evalf(ans);

1.463684753

(3)

### 2 ###

ans:=eval(Mean(Pi/4,3*Pi/2), [a=2,b=1]);

(Int((4*cos(t)^2+sin(t)^2)^(1/2)*(4*sin(t)^2+cos(t)^2)^(1/2), t = (1/4)*Pi .. (3/2)*Pi))/(Int((4*sin(t)^2+cos(t)^2)^(1/2), t = (1/4)*Pi .. (3/2)*Pi))

(4)

simplify(value(ans)); evalf(%);  # another bug!!!

(5*EllipticK((1/4)*3^(1/2)*5^(1/2))+(25*I)*EllipticK(1/4)-(16*I)*EllipticE(1/4)+(4*I)*EllipticE(4)-(4*I)*EllipticE((1/2)*I, 4)+(20*I)*EllipticF((1/2)*I, 4)-10)/(16*EllipticE((1/2)*2^(1/2), (1/2)*3^(1/2))+32*EllipticE((1/2)*3^(1/2)))

 

-.2882716323+.3166809263*I

(5)

evalf(ans);

1.406678625

(6)

### 3 ###

ans:=eval(Mean(Pi/4,3*Pi/2), [a=1,b=1]);  # circle, finally bug-free

(Int(cos(t)^2+sin(t)^2, t = (1/4)*Pi .. (3/2)*Pi))/(Int((cos(t)^2+sin(t)^2)^(1/2), t = (1/4)*Pi .. (3/2)*Pi))

(7)

simplify(value(ans)); evalf(%);

1

 

1.

(8)

evalf(ans);

1.000000000

(9)

 

 

ans:=rsolve({f(1) = 1, f(n+1) = 1/2*(f(n)+9/f(n))}, {f});

3*coth((1/2)*arccoth(1/3)*2^n)

(1)

# It's nice that Maple did it!

ans1:=simplify(convert(ans,compose,ln,exp)) assuming posint, n>1;

(3*2^(2^(-1+n))+3)/(2^(2^(-1+n))-1)

(2)

#(Not valid for n=1)

 

Edit for a simpler version

# Check
F:=n -> 1/2*(F(n-1)+9/F(n-1)): F(1):=1:
seq([F(n), ans1],n=1..7);


[1, 9], [5, 5], [17/5, 17/5], [257/85, 257/85], [65537/21845, 65537/21845], [4294967297/1431655765, 4294967297/1431655765], [18446744073709551617/6148914691236517205, 18446744073709551617/6148914691236517205]

 

First 63 64 65 66 67 68 69 Last Page 65 of 120