Question: why does it still not work ?

I'm sorry if I'm duplicating the information here. I tried to post a comment but it doesn't seem to be appearing.


When I change = to := it does not work. Maple says

 Error, invalid input: MultiSeries:-series expects its 2nd argument, eqn, to be of type {name, name = algebraic}, but received 1.*I

Here I don't think I need a variaable assignment just an =.  Did it work for you when you changed the equal sign ? In the other post I made I had  a similar routine I had = and not := and that code worked and got rid of the u but here I can't see why it doesn't.

The one that worked looked like this.

A_0 := VectorCalculus[`*`](VectorCalculus[`*`](VectorCalculus[`+`](1/VectorCalculus[`*`](2, Pi), VectorCalculus[`*`](10, sin(VectorCalculus[`*`](k, phi))))^2, VectorCalculus[`+`](1/VectorCalculus[`*`](2, Pi), VectorCalculus[`*`](10, sin(VectorCalculus[`*`](k, psi))))), 1/VectorCalculus[`+`](1, VectorCalculus[`+`](1/VectorCalculus[`*`](2, Pi), VectorCalculus[`*`](10, sin(VectorCalculus[`*`](k, phi))))^2));

> s1:= remove(has,A_0,psi);


with(MultiSeries); _EnvExplicit := true; s2:=subs(cos(k*phi)=((1-u^2) / (1+u^2)), cos(m*phi)=((1-u^2) / (1+u^2)), sin(m*phi)=((2*u) / (1+u^2)),sin(k*phi)=((2*u) / (1+u^2)), s1)*1/(1 + u^2); poles1 := singular(s2, u); t1a := map(`@`(rhs, op), [poles1]); p1 := proc (beta, Q, P) options operator, arrow: select(proc (x) options operator, arrow; 0 < Im(evalf(eval(x, [beta=beta, Q=Q, P=P]))) end proc, t1a) end proc; t1 := p1(beta,Q,P); poles2 := []; for i to nops(t1) do u = t1[i]; poles2 := [op(poles2), %] end do; poles := poles2; residues1 := zip(proc (x, y) options operator, arrow; simplify(x*(lhs-rhs)(y)) end proc, `~`[convert](`~`[MultiSeries:-series](s2, poles, 1), polynom), poles);


residue_total1 := 0;


for i to nops(residues1) do residue_total1 := simplify(residue_total1 + residues1[i], size) end do;


result1 := simplify(((2*Pi*I)*residue_total1),size);


I have the cos(k*phi) and so on substitutions because I will at some point use expressions with cosine. Also Preben thank you so much for your previous help.

 I need a bit more help please its sort of urgent.

Please Wait...