vv

13837 Reputation

20 Badges

9 years, 318 days

MaplePrimes Activity


These are answers submitted by vv

(for q=0.6, N=0)

 

F:=1.666666667*a*tanh(29.57459897*a^2-25.70807505)*ln((2*a^2+1.2*a-1.378524)/(2*a^2-1.2*a-1.378524))-2;

1.666666667*a*tanh(29.57459897*a^2-25.70807505)*ln((2*a^2+1.2*a-1.378524)/(2*a^2-1.2*a-1.378524))-2

(1)

plot([Re,Im](F),a=0.1e-3 .. 2);

 

plot( (2*a^2+1.2*a-1.378524)/(2*a^2-1.2*a-1.378524), a=0.1e-3 .. 2);

 

int(F, a = 0.1e-3 .. 2, numeric);  # Maple crash (mserver)

 

There is no universal recipe. In your example:

expr := 7*ln(arcsin(x))-(1/2)*ln(x-1)*sin(x)-(1/2)*ln(x+1)+f:
eval(expr, ln = ln@abs);

 

Here is another splitting procedure.
It's very simple but should work in (almost) all situations.
X0 is a point in the domain of definition (the default being [0,0,...])

   

SplitX:=proc(expr, X::list(name), X0:=0)
local f,A,c,n:=nops(X);
if X0=0 then A:=0*~X else A:=X0 fi;
f:=seq(eval(expr, X=~(subsop(i=X[i],A))),i=1..n);
c:=simplify(expr/mul(f));
if depends(c,X) then WARNING("Unsplitable") fi;
[c,f]
end:

 

Examples

 

SplitX(x*y, [x,y], [2,2]);

[1/4, 2*x, 2*y]

(1)

SplitX(-y+4*x^3*y,[x,y],[1,1]);

[1/3, 4*x^3-1, 3*y]

(2)

SplitX(-(y-exp(x))/(x-2),[x,y],[1,1]);

Warning, Unsplitable

 

[(y-exp(x))/((-1+exp(x))*(-y+exp(1))), -(1-exp(x))/(x-2), y-exp(1)]

(3)

SplitX(1-x+y^2-x*y^2,[x,y],[0,0]);

[1, -x+1, y^2+1]

(4)

(x^2*y+y)*y^3*exp(-x-y+1)*3^(-x-y)*sqrt(x^2*y-y);
SplitX(%, [x,y], [2,1]) assuming y>0;

(x^2*y+y)*y^3*exp(-x-y+1)*3^(-x-y)*(x^2*y-y)^(1/2)

 

[(9/5)*3^(1/2)*exp(2), (x^2+1)*exp(-x)*3^(-x-1)*(x^2-1)^(1/2), 5*y^(9/2)*exp(-1-y)*3^(-2-y)*3^(1/2)]

(5)

 


 

Download SplitX.mw

To check whether a list (or set) A has zero entries you can use
evalb(A = 0*~A);
or
is(A = 0*~A);

There are more efficient ways for large lists/sets.
 

 

Your series

diverges for any x. Usually it is better to avoid such a formula for a divergent series.

f := x -> piecewise(x < 0, 3^(-(1/3)*x^2), 1/2*2^(5^(-x)));
R := x -> int(f(t), t = x .. x+l):
L := x -> int(f(t), t = x-l .. x):
DD := x -> (R(x)-L(x))/(R(x)+L(x)):

DD(x);

It would be a good idea to use R := (x,h) -> int(f(t), t = x .. x+h):  etc
 

It is not a good idea to use LaTeX here. It is easier to use (and read) the Maple language.
Your set is   S = { k in N : f(k) = 0 }, where

f:= k -> floor((k-1)/2) - floor(k*log10(Pi));

To determine whether S is finite, a bit of math + Maple is enough:

limit(f(k), k=infinity);
      infinity

So, S is finite.

It is easy to use Maple to find the cardinality of S (i.e. the number of elements). Try it.

 

( Loss of significance).

Here is a simpler example.

F:=x -> sqrt(1+x^2)+x;
G:=x -> 1/(sqrt(1+x^2)-x);  # F = G

F(1008.)=G(1008.);
F(1009.)=G(1009.);  # !!??
F(1010.)=G(1010.);

                   2016.000496 = 2016.129032
                   2018.000496 = 2016.129032
                   2020.000495 = 2020.202020

 

LSSolve minimizes the sum of the squares of the "residuals". In your example it actually calls

Minimize( 1/2 * ( (x-1)^2 + (y-1)^2+ (z-1)^2 ), {-10 <= x, x <= 0, 6*x+3*y <= 1}, initialpoint = {x = -1, y = 1});

Note that Minimize finds only a local minimum, usually the one which is closer to initialpoint (if given). For your example there is only one local minimum, so initialpoint is superfluous.

The integral does not exist. It is infinity if n is an even positive integer.

Note that if you use r:=5/2 than maple produces a symbolic answer but it will be incorrect because a continuous antiderivative is not found (too many symbolic parameters). For example in this case Q(6) returns 0 (obviously wrong).

A necessary and sufficient condition is given by

istetra:=proc(a,b,c,d,e,f)
is(`and`(       #((
a>0,b>0,c>0,d>0,e>0,f>0,
2*max(a,b,c)<a+b+c,
2*max(a,e,f)<a+e+f,
2*max(d,b,f)<d+b+f,
2*max(d,e,c)<d+e+c,
LinearAlgebra:-Determinant(
<0,a^2,b^2,c^2,1; a^2,0,f^2,e^2,1; b^2,f^2,0,d^2,1; c^2,e^2,d^2,0,1; 1,1,1,1,0>) >0
))
end;

In tomleslie's answer the triangle inequalities for faces are missing.

A more elegant version is:

IsTetra:=proc(d::Matrix(4, shape=symmetric))
Matrix(3, (i,j)-> d[4,i]^2+d[4,j]^2-d[i,j]^2);
LinearAlgebra:-IsDefinite(%, query = 'positive_definite')
end proc:

Example.

T:=Matrix(4, {(1,2)=3, (1,3)=4, (2,3)=5, (1,4)=4, (2,4)=4, (3,4)=4}, shape='symmetric'):
IsTetra(T);

        true

Try:

K:= f -> `if`(type(f,piecewise), select(type, [op(f)], And(algebraic,Not(undefined))), f);

 

f:=a*x^2 + b*x + c:
max(solve(f = 0, x)) assuming a>0, b^2-4*a*c >= 0;

         

max(solve(f = 0, x)) assuming a<0, b^2-4*a*c >= 0;
     

Note that the largest root is not necessarily positive. It will if a*c<0 or (a*c>0 and a*b<0).

Use assumptions or formal sums

sum(x^n,n=0..infinity) assuming abs(x)<1;
sum(x^n,n=0..infinity,  formal);

 

J := n -> int(sin(Pi*x*n/T)*cos(Pi*x*n/T)/(sin(Pi*x/T)*cos(Pi*x/T)), x);

proc (n) options operator, arrow; int(sin(Pi*x*n/T)*cos(Pi*x*n/T)/(sin(Pi*x/T)*cos(Pi*x/T)), x) end proc

(1)

 

 

K:= unapply(combine(J(k)-J(k-2)), k):

J__even:=Sum(K(2*k), k=1..n/2) assuming n::even;

Sum(sin((4*Pi*k*x-2*Pi*x)/T)*T/(2*Pi*k-Pi), k = 1 .. (1/2)*n)

(2)

J__odd:=x+Sum(K(2*k-1), k=2..(n+1)/2) assuming n::odd;

x+Sum(sin((2*Pi*(2*k-1)*x-2*Pi*x)/T)*T/(Pi*(2*k-1)-Pi), k = 2 .. (1/2)*n+1/2)

(3)

# Compact forms:
 

'J__even'=value(J__even); # n::even

J__even = -((1/4)*I)*T*(-(-exp(-(4*I)*Pi*x/T))^(1/2)*LerchPhi(exp((4*I)*Pi*x/T), 1, (1/2)*n+1/2)*(-exp((4*I)*Pi*x/T))^(1/2)*exp((2*I)*Pi*x*(n+1)/T)+(-exp(-(4*I)*Pi*x/T))^(1/2)*LerchPhi(exp(-(4*I)*Pi*x/T), 1, (1/2)*n+1/2)*(-exp((4*I)*Pi*x/T))^(1/2)*exp(-(2*I)*Pi*x*(n+1)/T)+2*exp((2*I)*Pi*x/T)*(-exp(-(4*I)*Pi*x/T))^(1/2)*arctan((-exp((4*I)*Pi*x/T))^(1/2))-2*exp(-(2*I)*Pi*x/T)*arctan((-exp(-(4*I)*Pi*x/T))^(1/2))*(-exp((4*I)*Pi*x/T))^(1/2))/(Pi*(-exp((4*I)*Pi*x/T))^(1/2)*(-exp(-(4*I)*Pi*x/T))^(1/2))

(4)

'J__odd'=value(J__odd); # n::odd

J__odd = x+((1/4)*I)*T*(exp((2*I)*Pi*x*(n+1)/T)*LerchPhi(exp((4*I)*Pi*x/T), 1, (1/2)*n+1/2)-ln(1-exp(-(4*I)*Pi*x/T))+ln(-exp((4*I)*Pi*x/T)+1)-LerchPhi(exp(-(4*I)*Pi*x/T), 1, (1/2)*n+1/2)*exp(-(2*I)*Pi*x*(n+1)/T))/Pi

(5)

 

 

Download int.mw

First 69 70 71 72 73 74 75 Last Page 71 of 120