vv

12453 Reputation

19 Badges

10 years, 1 days

MaplePrimes Activity


These are replies submitted by vv

@nyarko 

After all, sqrt is the simplest function after polynomials.
Just think: can the sqrt be removed in  2 + sqrt(3) ?

The method was posted just for fun and to show a (very inefficient!) possibility. The polygonal approach is much more efficient but designing nice letter shapes is time consuming. The ideal solution would be to have an angle parameter in textplot.

Or, including the asymptotics:

with(IntegrationTools):
A:=Int(exp(-x*t)/sqrt(t^2+t),t=1..infinity):
to 6 do
  A:=Parts(A,GetIntegrand(A)/exp(-x*t)) assuming x>0;
od:
eval(A,Int=0);

@rlopez 

@Math Pi Euler 

Probably you have included the prompt.
Here is the worksheet: asy.mw

Forget about the robot, focus on maths.

So, what are the equations (constraints), and what do you want to maximize?

If you only have 2 equations
cos(q[1])*cos(q[3])-sin(q[1])*sin(q[3])+sin(q[1])*q[2]+cos(q[1]) - 1 = 0,
sin(q[1])*cos(q[3])+cos(q[1])*sin(q[3])-cos(q[1])*q[2]+sin(q[1]) -1 = 0;

then there are infinitely many solutions. One of them is:

fsolve([
cos(q[1])*cos(q[3])-sin(q[1])*sin(q[3])+sin(q[1])*q[2]+cos(q[1]) - 1 = 0,
sin(q[1])*cos(q[3])+cos(q[1])*sin(q[3])-cos(q[1])*q[2]+sin(q[1]) -1 = 0,
q[1]=0
]);

        {q[1] = 0., q[2] = 0., q[3] = 1.570796327}

 

 

@Adam Ledger 

See the help page  ?semilogplot

Actually you can simply use  the equivalent 

plot(eval(u, x=10^t), t=1..100);

the only difference being the tickmarks.

 

A very nice post!
Unfortunately it shows that to obtain the desired asymptotic expansion
the user must have sound knowledge in several mathematical fields such as
Special functions, Complex analysis, Optimization theory etc.
And of course Maple programming.
Let's hope that in the near future a simple call to
series(), MultiSeries:-series() or maybe MultiSeries:-multiseries
will be enough in most cases.

Just a side note. Some math parts of the worksheet should be converted into
"non-executable" for easier step-by-step execution.

 

The type of evalf[j](hf)  is hfloat  for 10 <= j <= 15.

restart;
hf:=HFloat(1.234567890123456789);
type(hf,hfloat);
for j to 20 do
lprint(j,evalf[j](hf));
od:

                        hf := 1.23456789012346
                              true

1, 1.
2, 1.2
3, 1.23
4, 1.235
5, 1.2346
6, 1.23457
7, 1.234568
8, 1.2345679
9, 1.23456789
10, HFloat(1.23456789012345669)
11, HFloat(1.23456789012345669)
12, HFloat(1.23456789012345669)
13, HFloat(1.23456789012345669)
14, HFloat(1.23456789012345669)
15, HFloat(1.23456789012345669)
16, 1.234567890123457
17, 1.2345678901234567
18, 1.23456789012345669
19, 1.23456789012345669
20, 1.23456789012345669

So, a workaround for a correct evalf[11](hf)  would be e.g.
evalf[11](evalf[20](hf));

 

 

 

@mweisbr 

So, you are using comma as a decimal separator. Probably this should work if the OS "locale" is set correctly.

But the simplest cure is to replace in your file "," by "." using a text editor (or Maple itself).

@Preben Alsholm 

in this case we still have:

Digits:=3:
[0.3333] <> [0.3333] + [0];

(at least visually.)

@Preben Alsholm 

The u in the post can be used. More generally:

# Proof
restart;
u:=evalf[Digits+1](1/3):
is( [u+0] = [u] + [0] ), evalb( [u+0] = [u] + [0] );

                            false, false

 

@Preben Alsholm 

There exists an algebraic exppresion u such that:

[u+0] <> [u]+[0];

 

@Cryme 

g is not C^2 (already answered).

A good package that does non need C^2 and finds even global optima is DirectSearch, see
https://www.maplesoft.com/applications/view.aspx?SID=101333

@mmcdara 

Because the question was about L^* . L = A.

The big problem is that Maple is not able to decide whether a complex number is real.
This should not be difficult for algebraic numbers.

 

f:=5*x^3-5*x+1;

5*x^3-5*x+1

(1)

s:=[solve(f,x)]:

is(s[1],real);  # FAIL

FAIL

(2)

is(RootOf(f,x,index=1),real); # true

true

(3)

max(Re~(s)); # OK
simplify(%); # Re persists

(1/30)*Re((-2700+(300*I)*219^(1/2))^(1/3)+300/(-2700+(300*I)*219^(1/2))^(1/3))

 

(1/30)*Re(((-2700+(300*I)*219^(1/2))^(2/3)+300)/(-2700+(300*I)*219^(1/2))^(1/3))

(4)

 

First 86 87 88 89 90 91 92 Last Page 88 of 166