## 449 Reputation

17 years, 89 days

## So,...

@Markiyan Hirnyk it would be really nice if someone solved it... :)

## So,...

@Markiyan Hirnyk it would be really nice if someone solved it... :)

## OK....

@Axel Vogt Thank you.

## OK....

@Axel Vogt Thank you.

## How?...

Can you write, please, how you obtained the modulo 2013 solution?

## How?...

Can you write, please, how you obtained the modulo 2013 solution?

## Thank you...

@Markiyan Hirnyk for the link. Good it is here!

## Thank you...

@Markiyan Hirnyk for the link. Good it is here!

## It needs to change a little then....

@french_fries Well, then you have to customize the steps to do what you want. That means, in the for-loop you have to test the real part to be negative. Then if you want the highest absolute value of the real part (according to your results), you actually need to minimize the constructed function.

Then by applying simplify and convert(...,exp) you can get the desired form, but it is a little different each time, so can't be automatized in this way.

## It needs to change a little then....

@french_fries Well, then you have to customize the steps to do what you want. That means, in the for-loop you have to test the real part to be negative. Then if you want the highest absolute value of the real part (according to your results), you actually need to minimize the constructed function.

Then by applying simplify and convert(...,exp) you can get the desired form, but it is a little different each time, so can't be automatized in this way.

## Preben Alsholm's procedure....

@french_fries When you use Kitonum's procedure, you can apply then convert(...,exp) or Preben Alsholm's PolarForm procedure, which I just found here: http://www.mapleprimes.com/questions/35453-Exponential-Form-For-Complex-Number.

PolarForm:=proc(tal::{algebraic,list,set},e::name:='useexp')
local EXP;
if type(tal,{list,set}) then return map(procname,tal,e) end if;
if type(tal,specfunc(anything,polar))
then
if e='useExp' then op(1,tal)*Exp(I*op(2,tal)) else op(1,tal)*'exp'(I*op(2,tal)) end if
else
end if
end proc:

Then you get e.g.:

PolarForm(P(w^10 = 15-(15*I)*sqrt(3)));

## Preben Alsholm's procedure....

@french_fries When you use Kitonum's procedure, you can apply then convert(...,exp) or Preben Alsholm's PolarForm procedure, which I just found here: http://www.mapleprimes.com/questions/35453-Exponential-Form-For-Complex-Number.

PolarForm:=proc(tal::{algebraic,list,set},e::name:='useexp')
local EXP;
if type(tal,{list,set}) then return map(procname,tal,e) end if;
if type(tal,specfunc(anything,polar))
then
if e='useExp' then op(1,tal)*Exp(I*op(2,tal)) else op(1,tal)*'exp'(I*op(2,tal)) end if
else
end if
end proc:

Then you get e.g.:

PolarForm(P(w^10 = 15-(15*I)*sqrt(3)));

## evalc...

@french_fries That is caused by is command failure. To correct it, evalc has to be added. So the for-loop would look like this:

sol_pos := []:
for i to nops(sol) do
if (is(Re(evalc(sol[i])), positive) and is(Im(evalc(sol[i])), positive))
then sol_pos := [op(sol_pos), sol[i]]
end if
end do;

And then it is also more complicated to obtain as nice as possible result. For the first equation I get:

simplify(convert(simplify(Re(evalc(sol_pos[1]))+I*Im(evalc(sol_pos[1]))), exp));

evalf(%);

1.216866001 + 0.7025579132 I

Desired form of result should be:

30^(1/10)*exp((1/6)*Pi*I);  # Maple evaluates the exponential

For the second equation I get:

convert(simplify(Re(evalc(sol_pos[1]))+I*Im(evalc(sol_pos[1]))), exp);

evalf(%);

1.187391998 + 0.2814170731 I

Your solutions don't lie in the first quadrant:

evalf(30^(1/10)*exp((29/30*I)*Pi));

-1.397418455 + 0.1468745972 I

evalf(6^(1/9)*exp((26/27*I)*Pi));

-1.212033806 + 0.1416664333 I

## evalc...

@french_fries That is caused by is command failure. To correct it, evalc has to be added. So the for-loop would look like this:

sol_pos := []:
for i to nops(sol) do
if (is(Re(evalc(sol[i])), positive) and is(Im(evalc(sol[i])), positive))
then sol_pos := [op(sol_pos), sol[i]]
end if
end do;

And then it is also more complicated to obtain as nice as possible result. For the first equation I get:

simplify(convert(simplify(Re(evalc(sol_pos[1]))+I*Im(evalc(sol_pos[1]))), exp));

evalf(%);

1.216866001 + 0.7025579132 I

Desired form of result should be:

30^(1/10)*exp((1/6)*Pi*I);  # Maple evaluates the exponential

For the second equation I get:

convert(simplify(Re(evalc(sol_pos[1]))+I*Im(evalc(sol_pos[1]))), exp);

evalf(%);

1.187391998 + 0.2814170731 I

Your solutions don't lie in the first quadrant:

evalf(30^(1/10)*exp((29/30*I)*Pi));

-1.397418455 + 0.1468745972 I

evalf(6^(1/9)*exp((26/27*I)*Pi));

-1.212033806 + 0.1416664333 I