vv

12453 Reputation

19 Badges

9 years, 285 days

MaplePrimes Activity


These are replies submitted by vv

@Carl Love 

The simplify/symbolic may affect f because it could contain ln(exp(...)).
[A tested counterexample is f:= z-> ln(exp(1/z - 1/sqrt(z^2))) ]
You try do obtain: Int(f(exp(t*I))*exp(t*I), t = -%Pi .. %Pi)*I
Why not use it directly?

@Carl Love 

I don't find a good idea to use Change in this case. Trying to repair with simplify/symbolic has no chance.
For example, f := z -> 1/z - 1/sqrt(z^2)

@Carl Love 

Your result will be 0 for any f.

 

@Kitonum 

The other solution is also traditional: integration by parts.

@Carl Love 

Probably simplify just gives 0 for Sum(0,...). But it's nice to see the huge amount of work Maple does to simplify (using the assumptions on n): use 
infolevel[all]:=5

@mmcdara 

If the variables are already assigned, you will have to change a bit the code:

restart;
vars   := [a, b__c, t[1]];
a:=1234;
assign(eval(vars,1) =~ [$1..3]);

 

So, you just want the residue at z=0 of the function

 

f := z -> exp(-1/z)/((z - 1)*(z + 1)^2);

proc (z) options operator, arrow; exp(-1/z)/((z-1)*(z+1)^2) end proc

(1)

(Actually the series can be computed with the same method).

exp(-1/z) = Sum(a(n)/z^n, n=0..infinity);

exp(-1/z) = Sum(a(n)/z^n, n = 0 .. infinity)

(2)

a := n -> (-1)^n/n!

proc (n) options operator, arrow; (-1)^n/factorial(n) end proc

(3)

1/((z - 1)*(z + 1)^2) = Sum(b(n)*z^n, n=0..infinity);

1/((z-1)*(z+1)^2) = Sum(b(n)*z^n, n = 0 .. infinity)

(4)

convert(lhs(%),FPS);

Sum((-1/4-(3/4)*(-1)^k-(1/2)*(-1)^k*k)*z^k, k = 0 .. infinity)

(5)

b := unapply(op([1,1],%),k)

proc (k) options operator, arrow; -1/4-(3/4)*(-1)^k-(1/2)*(-1)^k*k end proc

(6)

The residue:

'residue'(f(z), z=0) = sum(a(n+1)*b(n), n=0..infinity);

residue(exp(-1/z)/((z-1)*(z+1)^2), z = 0) = (1/4)*(exp(1)-1)/exp(1)+(3/4)*exp(1)-1/4

(7)

evalf(rhs(%))

1.946741511

(8)

# Check:

evalf(Int(f(exp(I*t)/2)*exp(I*t)/2/(2*Pi),t=0..2*Pi));

1.946741511+0.5457130825e-14*I

(9)

 

 

 

 

 

 

@acer 

A useful info!

It works in Windows 64 bit if  ':-LIB'="libmkl_rt.so"  is replaced by ':-LIB'="mkl_rt"

 

@ajfriedlan 

The answer to your question is simple, given by some elementary numerical analysis principles. Your numerical expressions have very wide ranges (10^(-20) .. 10^40). To compensate the roundoff errors you will need very high precision. But normally, your parameters should also have good precision, otherwise the result will be mainly numerical noise. 

You should normalize/scale the expressions and try to simplify symbolically first.

@Ugurgozutok 

The procedure works for several variables, we just need to choose the main one (x); the degree n in x must be even.
Note however that if the leading coefficient wrt x depends on other variables, then the result will be generally a rational function rather than a polynomial. This is natural, for example, x^2*y^2 + x^2 + y^2 obviously cannot be expressed as (a(y)*x+b(y))^2 + c(y)*x+d(y), a,...,d being polynomials.

 

@saketh 

It is of course possible (and easy) to find the polynomial solution directly, but I doubt about a better timing (the number of terms in the polynomial will be huge).

Does the program work in a console? If yes, then make a .bat (.cmd) file and call this with ssystem.

@Ugurgozutok 

I don't quite understand the style of your questions. It is neither mathematics (no context, no proper notations etc) nor Maple (not a single line of code). For example, when computing gcd (or need irreducibility as in your other thread) the exact ring for your polynomials is essential.

@Ugurgozutok 

As I have mentioned, the problem is delicate in general and not fully stated (you gave 0 details). The linearity in d in my example is not important, but d in Z is essential. If your polynomial p is in R[x,y] and the degree is just 20, the chances for a solution are about 0% (even if p is linear in d).

@Carl Love 

It will be difficult to shrink it further. Vote up.

First 38 39 40 41 42 43 44 Last Page 40 of 166