## 36 Reputation

11 years, 356 days

## inttrans...

There is always:

foo:=inttrans[fourier](1/(u^2+1/4), u, -k);
NumericEventHandler(invalid_operation =`Heaviside/EventHandler`(value_at_zero = 1/2));
convert(foo, piecewise);

```                        {  2 Pi exp(k/2)         k <= 0
{
{ 2 Pi exp(- k/2)        0 < k
```

The bug in int seems to be a problem with the indefinite integral or with limit:

```> F:=int(1/(u^2+1/4)*exp(I*u*k),u);
-I (-k exp(- k/2) Ei(1, -u k I - k/2) + k exp(k/2) Ei(1, -u k I + k/2))
F := -----------------------------------------------------------------------
k

> limit(F,u=infinity);
0

> limit(F,u=-infinity);
0

```

## not a numerical artifact...

I thought it might be floating point noise, but the graph looks the same even computing S with Digits:=100;

Interesting.

## there's the bug...

The problem is definitely below this somewhere:

Maple 10:
`evalf/Sum/LevinU_Symb/1_inf`(sin(.1000000000e-3*i^2), i, 0);
Float(infinity)

`evalf/Sum/LevinU_Symb/1_inf`(sin(.1000000000e-3*i^2), i, 200);
FAIL

Maple 12:
`evalf/Sum/LevinU_Symb/1_inf`(sin(.1000000000e-3*i^2), i, 0);
89.48019280

`evalf/Sum/LevinU_Symb/1_inf`(sin(.1000000000e-3*i^2), i, 200);
-37.80892093

I suppose the right answer is probably Float(infinity) for all of these.

It looks like at least one line (14) has changed.

## Working in Maple 10...

This computation works fine in Maple 10:

```Sum(sin(1/10000.0*i^2), i = 0 .. 199):
%, value( % ), evalf( % );
199
-----
\                         2
)   sin(0.0001000000000 i ), 80.85387131, 80.85387129
/
-----
i = 0
```

As I understand it, sum on a fixed range sometimes gets transformed like:

```sum(sin(1/10000.0*i^2), i = 0 .. 199)
= sum(sin(1/10000.0*i^2), i = 0 .. infinity)
- sum(sin(1/10000.0*i^2), i = 200 .. infinity);
```

or

```sum(sin(1/10000.0*i^2), i = 0 .. 199)
= eval(sum(sin(1/10000.0*i^2), i = 0 .. n), n=199)
```

But it doesn't seem to be the latter in this case, since that sum returns unevaluated.  (And both of these seem like a bad idea compared to actually adding in many cases - except maybe for telescoping or alternating sequences).

## Differences...

There are some differences between the internal representation and the inert representation, mostly in the cases of sums and products, as the internal representation is designed for fast polynomial arithmetic as opposed to convenient programmatic manipulation. For the exact internal representation, see dismantle.
For a list of the various Maple DAGs, refer to "Appendix A: Internal
Representation and Manipulation" in the Maple Advanced Programming Guide.

If you look at the programming manual, you'll see that a SUM dag is an n-ary linear combination without need for internal PRODs.  Dismantle shows the lack of PRODs in that case, while ToIntert shows PRODs:

```> dismantle(1*x+3*y+3*z);

SUM(7)
NAME(4): x
INTPOS(2): 1
NAME(4): y
INTPOS(2): 3
NAME(4): z
INTPOS(2): 3

> ToInert(1*x+3*y+3*z);
_Inert_SUM(_Inert_NAME("x"), _Inert_PROD(_Inert_NAME("y"), _Inert_INTPOS(3)),
_Inert_PROD(_Inert_NAME("z"), _Inert_INTPOS(3)))
```

Similarly, a PROD dag is an n-ary product of powers without need for internal POWER dags.

Also, that the ToInert return appears as the expression tree rather than the DAG structure. It doesn't seem to have a facility for reusing subexpressions which would be required for mirroring the DAG more directly.

## [op]...

This will do it:

map2([op],1..3,foo);

## [op]...

This will do it:

map2([op],1..3,foo);

## Unique Solution...

With two equations and two variables, you have a unique solution.  In this case, solve finds and it is:  {r_1 = 1., r_2 = 0.1972170132}

## Unique Solution...

With two equations and two variables, you have a unique solution.  In this case, solve finds and it is:  {r_1 = 1., r_2 = 0.1972170132}

## Substitutions...

It looks like that in your fsolve call, you are setting Ez1=Ez2=Ez3.  If you do that simplification before calling solve you get reasonable looking symbolic answers in Maple 12:
sol := solve(eval({eq1, eq2, eq3}, {Ez2 = Ez1, Ez3 = Ez1}), {Xz1, Xz2, Xz3});

Sol has complicated RootOfs but if you look they are quadratic in _Z, so allvalues will give reasonable answers:

allvalues(sol[2]);

Gives me: {Xz1 = -k*(-r+q*Ez1)/r, Xz2 = -k*(-r+q*Ez1)/r, Xz3 = -k*(-r+q*Ez1)/r}

And allvalues(sol[5]);
{Xz1 = -k*(d*k-(1/2)*r+(1/2)*q*Ez1+(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))/r, Xz2 = -k*(d*k-(1/2)*r+(1/2)*q*Ez1+(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))/r, Xz3 = ((1/2)*r-2*d*k-(1/2)*q*Ez1+(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))*k/r}, {Xz1 = -k*(d*k-(1/2)*r+(1/2)*q*Ez1-(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))/r, Xz2 = -k*(d*k-(1/2)*r+(1/2)*q*Ez1-(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))/r, Xz3 = ((1/2)*r-2*d*k-(1/2)*q*Ez1-(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))*k/r}

## Substitutions...

It looks like that in your fsolve call, you are setting Ez1=Ez2=Ez3.  If you do that simplification before calling solve you get reasonable looking symbolic answers in Maple 12:
sol := solve(eval({eq1, eq2, eq3}, {Ez2 = Ez1, Ez3 = Ez1}), {Xz1, Xz2, Xz3});

Sol has complicated RootOfs but if you look they are quadratic in _Z, so allvalues will give reasonable answers:

allvalues(sol[2]);

Gives me: {Xz1 = -k*(-r+q*Ez1)/r, Xz2 = -k*(-r+q*Ez1)/r, Xz3 = -k*(-r+q*Ez1)/r}

And allvalues(sol[5]);
{Xz1 = -k*(d*k-(1/2)*r+(1/2)*q*Ez1+(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))/r, Xz2 = -k*(d*k-(1/2)*r+(1/2)*q*Ez1+(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))/r, Xz3 = ((1/2)*r-2*d*k-(1/2)*q*Ez1+(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))*k/r}, {Xz1 = -k*(d*k-(1/2)*r+(1/2)*q*Ez1-(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))/r, Xz2 = -k*(d*k-(1/2)*r+(1/2)*q*Ez1-(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))/r, Xz3 = ((1/2)*r-2*d*k-(1/2)*q*Ez1-(1/2)*(r^2-2*r*q*Ez1+q^2*Ez1^2-8*d^2*k^2)^(1/2))*k/r}

## Using lsof -i...

Using lsof -i on my Ubuntu 8.04 box, I get Maple using the following ports:

```COMMAND  PID USER   FD   TYPE  DEVICE SIZE NODE NAME
java    4252 moe   60u  IPv6 1348892       TCP *:50577 (LISTEN)
java    4252 moe   72u  IPv6 1348979       TCP localhost:50577->localhost:47722 (CLOSE_WAIT)
java    4252 moe   75u  IPv6 1348984       TCP localhost:39466->localhost:50575 (ESTABLISHED)
mserver 4286 moe    3w  IPv4 1348970       TCP localhost:50575 (LISTEN)
mserver 4286 moe    5u  IPv4 1348980       TCP localhost:50575->localhost:39466 (ESTABLISHED)
mfsd    4288 moe    3u  IPv4 1348970       TCP localhost:50575 (LISTEN)
```

A couple sessions started around the same time as each other all used the same port: 50575.

## Using lsof -i...

Using lsof -i on my Ubuntu 8.04 box, I get Maple using the following ports:

```COMMAND  PID USER   FD   TYPE  DEVICE SIZE NODE NAME
java    4252 moe   60u  IPv6 1348892       TCP *:50577 (LISTEN)
java    4252 moe   72u  IPv6 1348979       TCP localhost:50577->localhost:47722 (CLOSE_WAIT)
java    4252 moe   75u  IPv6 1348984       TCP localhost:39466->localhost:50575 (ESTABLISHED)
mserver 4286 moe    3w  IPv4 1348970       TCP localhost:50575 (LISTEN)
mserver 4286 moe    5u  IPv4 1348980       TCP localhost:50575->localhost:39466 (ESTABLISHED)
mfsd    4288 moe    3u  IPv4 1348970       TCP localhost:50575 (LISTEN)
```

A couple sessions started around the same time as each other all used the same port: 50575.

## what is real...

What is real is beyond all reach.

## hmm...

alec once said:

Also, with the amount of time that I invested in Maple, I don't want to harm it in any way - but I want it to be improved. In particular, I don't want to post bugs in public, but I'd like to be able to post them as private posts - available only to the people in my Friends list.

Why the change of heart?

 1 2 3 4 Page 3 of 4
﻿