vv

12453 Reputation

19 Badges

9 years, 284 days

MaplePrimes Activity


These are answers submitted by vv

extrema(y,{},{x,n});

or

yy:=subs(x=t/n,y);
extrema(yy,{},t);

You must save n too, so use:
save n, x, "./myfunction.m"

(note that after restart and read the assume property for n is lost, as about(n) shows, see below).

 

I seem to recall that in new Maple versions, saving in internal .m format is not recommended.
Why don't you save in a text file? You can put your assumptions in a procedure and save them too.

If you insist  in using .m files, and use the assume facility, you will have to save the properties. This can be done by saving also `property/object`. In yor example:

save n, x, `property/object`,  "./myfunction.m"

 

 

1. Try to avoid 2D math for input
2. You can obtain a symbolic solution.

#k:=1;
eq := diff(g(Y), Y$4)+diff(g(Y), Y$2)+g(Y);
cis := g(1/4) = k, D(g)(1/4) = 0, g(0) = k, (D@@2)(g)(0) = 0;
dsolve([eq, cis]);

t:= `Hello Bob`;
cat(cat(t,` `)$5);

It is generally impossible to generate all the elements of the group GL(n,q) because its order is huge.
Maple knows this order (a classical formula).

with(GroupTheory):
GroupOrder(GL(4,2)); #your group
      20160
GroupOrder(GL(5,2));
      9999360
GroupOrder(GL(4,3));
      24261120
GroupOrder(GL(8,2));  # !!!
      5348063769211699200
GroupOrder(GL(n,q));  #even symbolically!
       







 

 

For symbolic result in (-Pi,Pi]

angle + 2*Pi*floor(1/2-angle/(2*Pi));

Reduce(X,X,T) is useless, it will produce only zeros.

If you want to see if a polynomial p in X is dependent of the other ones, you should call Reduce versus the rest of the polynomials i.e.

Reduce(p, Xp, T)
where
Xp := convert( convert(X,set) minus {p}, list );
Actually you should use a Groebner basis for Xp, otherwise the reduction could be incomplete (so, irrelevant).

In many situations Maple gives "generic" solutions.
For example, solve(a*x-2*a,x)  ==> x=2  (ignoring the case a=0).
However,  solve(a*x-2*a);  ==> {a = a, x = 2}, {a = 0, x = x}.
Your system has many equations of the form  a*b+c*d = 0.
solve([a*b+c*d]); ==> {a = -c*d/b, b = b, c = c, d = d},  so the solutions having b=0 are lost.

In such situation it is safer to use the Groebner package but unfortunately the system is too big for this.

 

They are the same, because in Sample(X,n), X can be a distribution (as in your first case) or a random variable (the second case).

Maple has difficulties because the integrand is discontinuous, symbolic and the zeros in [0,2*Pi] of
h := a*cos(t+b)+sin(t+c);
cannot be found easily in terms of a,b,c.

If you want the integral for numeric values of a,b,c, use numerical integration:
int(  eval(signum(h),[a=1,b=2,c=3]), t=0..2*Pi, numeric);

But a little math helps to see that the integral is always 0 for real a,b,c.
In fact, h can be written as
h = c*cos(t) + d*sin(t), or
h= c*sin(t+d);
Now, h is 2Pi-periodic, so
int(signum(c*sin(t+d)), t=0..2*Pi) = int(signum(c*sin(t)), t=0..2*Pi) = signum(c)* int(signum(sin(t)), t=0..2*Pi)=0.

 Edit. corrected typo: abs to signum

with(Bits):
bits:=Join([1,0,0,0,0,0,0,0]):
text:=Join([1,1,1,1,0,0,1,1]):
Xor(bits,text):
Split(%,'bits'=8);  #flip positions
add(%);  # number of flips
                    [0, 1, 1, 1, 0, 0, 1, 1]
                               5

You probably want a list.

m:=Matrix([[0,1,0,1,0,1,0]]);

 convert(m,list);
                     [0, 1, 0, 1, 0, 1, 0]

T := 2*cos(4*w):
E := sin(3*w):
plot( [E,T, w=0..2*Pi]);

eq1a:=subs(rhs(eq1)=freeze(rhs(eq1)),eq1):
eq2a:=subs(rhs(eq2)=freeze(rhs(eq2)),eq2):
solve({eq1a,eq2a},{a,e}):
thaw(%);

Maple cannot obtain a rational parametrization for curve(alpha,beta)=0, because the genus is not 0.

But, being quadratic in alpha, a parametrization can be easily obtained by solving wrt alpha.

Let's take a simpler example, to see easier the results.

ec:= (u,v) -> u^2-u+3*v^3-v-2:  # the curve is ec(u,v)=0
# choose a point on it
u0:=0.6:
v0:=fsolve(ec(u0,v),v);

vv:=v0+z^2:   # choose v as you wish
solve(ec(u,v),u);   # find parametrization for u  (exact)

eval(%[1],v=vv);   # choose the desired branch
uu:=series(%,z,8):  # obtain the approx parametrization
u=uu,v=vv;   # Parametrization near (u0,v0)

 

First 99 100 101 102 103 104 105 Last Page 101 of 111