vv

13992 Reputation

20 Badges

10 years, 38 days

MaplePrimes Activity


These are answers submitted by vv

pdsolve looks for classical solutions, C^1 in this case. Your pde has not such solutions: the solution without bc, ic is u(x,t)=_F(t-x).

The solution given by Mathematica is not differentiable.
 

f:=int(sqrt(sin(x)),x):
a:=limit(f,x=Pi/2,left):
answer:=piecewise(x<Pi/2,f-a, x=Pi/2,0, -eval(f-a,x=Pi-x));

 

n:=4:
Z:=Matrix(n):  # zero matrix
LinearAlgebra:-MatrixExponential(Z);

This should be mathematically obvious because exp(Z) = I + Z^1/1! + Z^2/2! + ... = I

 

 

You should be aware that an expression has many equivalent forms.

SUBS:=proc(f,x)
local F,N:=0, g;
g:=subs(x=F(),f);
F:=proc() N:=N+1; x[N] end;
eval(g)
end:

SUBS(exp(-I*Pi*(n+2*n*(m-1))/m), n);

 

Probably you want integer (or rational) points, otherwise it's trivial.
Such points do not exist. Use isolve.

assume has limited capabilities especially for more than one variables.

restart;
f:=n -> (3*n-1)/(n^3+2*n+1):
is(f(n)<f(m)) assuming n>1,m>n;                  #false,OK
is(f(n)<f(m)) assuming n>1,m>n,n::integer;       #false,OK
is(f(n)>f(m)) assuming n>1,m>n;                  #FAIL,should be false
is(f(n)>f(m)) assuming n>1,m>n,n::integer;       #FAIL,should be true
g:=D(f):
is(g(n) < 0) assuming n>1;                 #false,OK
is(g(n) < 0) assuming n>1, n::integer;     #true,OK
is(g(n) < 0) assuming n>=2;                #true,OK

 

The value of each double integral is actually +oo.

The numerical routines may have problems in such cases. [Here one of the factors is small and the other is large near 0].

A0:=Matrix(1,1,(i,j)->a):
B0:=Matrix(1,5,(i,j)->b):
C0:=Matrix(5,1,(i,j)->c):
D0:=Matrix(5,5,(i,j)->d):
<<A0|B0>,<C0|D0>>;

 

With your definitions of the exports, :-Proc1   etc  must be defined after the module.
Actually this is equivalent to defining  export Proc1 := :-Proc1    etc

So, this works:

#ff:=x->2*x+3;
M := module()
  option package;
  export f;
  f:=eval(:-ff);
end module:
ff:=x->2*x+3:
with(M):
f(x): # 2*x+3
unwith(M):
#f(x);
ff:=x -> 5*x:
#f(x);
with(M):
f(x);  #5*x

But if you uncomment the fist line, without a restart f is not changed.


 

You can simply remove the small singular values

restart;

Digits:=15:  eps:=5e-9:

with(LinearAlgebra):

R := RandomMatrix(4,datatype=float):

d:=[1.2,  0.5,  3e-9,  2e-9]:

A:=R.DiagonalMatrix(d).R^(-1);

_rtable[18446744074327755102]

(1)

Rank(A);

4

(2)

RANK:= A -> add(`if`(t<>0,1,0), t = fnormal(SingularValues(A), Digits, eps) ):

RANK(A);

2

(3)

 

 

(Corrected)

3 &^ 665 mod 10^10;
       7817543843

This also works for huge numbers:

3 &^ 123456789 mod 10^10;
       5225122483
 

 

 

You cannot use isolve for this. But you don't need it because

j = floor(m*t) + 1

Most error messages are clear enough.
If the arguments are not displayed, you can do something like this:

GETBITS:=proc()
try
  Bits:-GetBits(args);
  catch:
  error "Bits:-GetBits", lasterror, 'ARGS'=args;
end try
end proc:

GETBITS(64+4,2);
                               1
GETBITS(12.3, 4);
Error, (in GETBITS) Bits:-GetBits, argument 1, the number, must be a nonnegative integer, ARGS = (12.3, 4)

 

The direct computation would be inefficient.

Maple uses the prime factorization and Euler's product formula (see the wiki article).
You can see the implementation:

showstat(NumberTheory:-Totient);

 

An orbit is not associated to an element of the group (x in your case). It is associated to an i ∈ {1,2,3}.

Maybe you want the order of x [which equals the order of the (cyclic) group generated by x].

You should post the Maple code and the expected answer.

First 74 75 76 77 78 79 80 Last Page 76 of 120