1864 Reputation

9 Badges

1 years, 152 days

MaplePrimes Activity

These are answers submitted by vv

You don't need Maple: the function is odd, so, the integral is 0.

The equation is not "simple".
1. It is not given explicitely y'(x) = f(x, y(x))
2. It has 2 conditions instead of one.

dsolve finds symbolically the correct solution:

because by chance it has one (even if two condition were used).
For a numerical solution you would need to give the explicit form and only one condition.
[Note that even in this case the equation  y' = sqrt(y-1) is not simple  because RHS is not Lipschitz near y0=1].


This is normal, sqrt is not differentiable at 0.

If you want an expansion (non-Taylor), you may use:

eval(mtaylor(tanh(B*J*Q*z+B*Jo*m), [Q, m], 9) , Q=sqrt(q));




See  ?sum,details  for the definition of sum when lowerlimit > upperlimit.

In your case
sum(-f(k+1,x), k = 0 .. -2) ;

So, your sum equals GAMMA(0,x)  =  Ei(1,x).

If you have a finite sum such as  s(x) = a[0] + a[1]*x + ... + a[9]*x^9
it is not possible to find a (unique) function whose Taylor (or other) series starts  with s(x).
[A similar problem is to find "the" irrational number for which the first decimals are 1.234]

Using your random generators,  the equality fails in about 2% of the tests.

NN := 1000:
err := 0: 
to NN do 
d := Generate(integer(range = 1 .. 120)); 
T := Generate(integer(range = 1 .. d)); 
B := Generate(integer(range = 1 .. d)); 
Y := Generate(integer(range = 0 .. B)); 
Pr := Generate(integer(range = 0 .. d-T)); 
py := Generate(integer(range = 0 .. min(Y, d-T, Pr))); 
e1 := binomial(Y, py)*(binomial(d-Y, Pr-py)*binomial(d-Pr, T)-binomial(d-B, T)*binomial(d-T-Y, Pr-py))/(binomial(d-T, Pr)*(binomial(d, T)-binomial(d-B, T))); 
e2 := add((binomial(Y, n)*binomial(d-Y, T-n)/(binomial(d, T)-binomial(d-B, T))+n-max(n, binomial(d-B, T)/(binomial(d, T)-binomial(d-B, T))))*binomial(Y-n, py)*binomial(d-T-Y+n, Pr-py)/binomial(d-T, Pr), n = 0 .. Y); 

if e1 <> e2 then err := err+1; print(e1 <> e2, 'd'=d, 'T'=T, 'B'=B, 'Y'=Y, 'Pr'=Pr, 'pr'=py) end if end do: 


It is not a good idea to use floats in symbolic computations (if you can avoid them).

Replacing 0.2 by 1/5 (or convert( ...,rational) ), everything is OK.

Alternatively, increase Digits.

Body := display([
point([1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), 
point([-1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), 
point([0, 1, 0], colour = purple, symbolsize = 50, symbol = solidsphere), 
line([0, 0, 0], [1, -.2, 0]), 
line([0, 0, 0], [-1, -.2, 0]), 
line([0, 0, 0], [0, 1, 0]), line([0, 0, 0], [.5, 0, 0], colour = red, thickness = 4), 
line([0, 0, 0], [0, .5, 0], colour = yellow, thickness = 4), 
line([0, 0, 0], [0, 0, .5], colour = blue, thickness = 4)], scaling = constrained):
w1 := .35: w2 := .45: w3 := .15:
animate( rotate, [Body,w1*t,w2*t,w3*t], t=0..8*Pi,frames=100 );


The cure is simple: define ff1 etc via unapply, e,g.

ff1 := unapply( display([line([0, 0, 0], [d[1][1], d[1][2], d[1][3]], colour = red, thickness = 4)]),  t);

Your code works. The only problem is that a,b,c,x3  are complex (in general) so in printf you must replace for example  %2.8f  with %2.8Zf  (and without spaces!).

You must assign ranges for all the variables (or for none).
You may set of course e.g.  A0 = -infinity .. infinity  if you have not a better range.

It is unlikely that the print occurs only at the end, unless a procedure consumes almost all of the running time.
Maybe you must scroll the page while running in order to see the messages.

Anyway, you can set e.g.

before running the procedure and see exactly what it is doing. If necessary increase slightly the printlevel value.

SmithForm does not accept polynomials with complex coefficients.
But there exists LinearAlgebra:-Generic:-SmithForm which works in any Euclidean domain. In order to use it in C[z], some simple procedures must be provided by the user (see the help page). For example:

C[EuclideanNorm] := a -> degree(a,z):
C[Gcdex] := (a,b,s,t)->gcdex(a,b,z,s,t):


After that, you can use:
LinearAlgebra:-Generic:-SmithForm[C](A, output=['S','U','V']):

You can't prove such a theorem using a CAS.
But you can check it for any value or range of values. For example:

seq( [n, isprime(n), mods( (n-1)!, n ) = -1],  n=2..100);

It is not uncommon in mathematics to solve a problem using two metods and obtain very different forms as answers. And sometimes it is very difficult to prove directly that the results are the same.

In our case this can be done using Maple itself.

a:=21*arccos(RootOf(448*_Z^7+192*_Z^6-784*_Z^5-288*_Z^4+392*_Z^3+108*_Z^2-49*_Z-6, index = 2))/Pi:
b:=-(21*I)*ln(RootOf(7*_Z^14+6*_Z^13+6*_Z+7, index = 2))/Pi:

#      so, a=b is plausible
expand(  cos(c) - 1):
convert(%, RootOf):


At this moment we are almost done (provided that Maple's computations are correct).
We know that c is a multiple of 2*Pi, so it would remain e.g. to show that |c| < 1 to conclude that c=0; this is not difficult.


1 2 3 4 5 6 7 Last Page 1 of 26