vv

13922 Reputation

20 Badges

10 years, 9 days

MaplePrimes Activity


These are replies submitted by vv

@Markiyan Hirnyk 

This can be done by brute force.

a:=proc(n) option remember; 4*a(n-1)-a(n-2) end:
a(0):=1: a(1):=2:
ifactor(a(2015),easy);

@Earl 

plot3d deals only with surfaces. For a surface, even if closed, it could be very complicated/impossible to determine the "interior", see https://en.wikipedia.org/wiki/Alexander_horned_sphere

@hind 

You are pasting as text your 2d math expressions. This is not a good idea; it is better to upload the worksheet.

If you want to compute the integral j:

use

simplify(j) assuming x>0, x<Pi/2;

==>

@asa12 

eigenvector1[1] is a huge expression (its length is 280100). It is not a polynomial, so roundcoeffs1 cannot be used.

@Kitonum 

Yes, this seems to be the most concise solution (at least for a polynomial without parameters).

@Preben Alsholm 

round(a) is missing. This could be ok, but it is wrong for

p:=3.5*x^2+3.2*x-6.5+88.3*x*y-y^3+a*y + sin(1);

@schapplm 

I mean the inert form %arctan.

You can anytime use value(expr) to turn it into active.

@asa12

 If you want to avoid "elementwise"; should work in old versions of Maple:

restart;
Round := proc(x,n::integer:=1)
parse(sprintf(cat("%.",n,"f"),x));
end proc:


roundcoeffs1:=proc(p,x,n:=1)  local t,c;
c:=map(Round, [coeffs(p,x,t)],n);
add(zip(`*`, c, [t]));
end:
p:=3.5*x^2+3.2*x-6.5+88.377*x*y-y^3+7*y:
roundcoeffs1(p,[x,y],2);

@gkokovidis 

Just try also for:

(-2*sqrt(7)-4)*EllipticK((1/8)*sqrt(2)*(-3+sqrt(7)))^2+4*EllipticE(-(1/8)*sqrt(2)*(-3+sqrt(7)))*sqrt(7)*EllipticK((1/8)*sqrt(2)*(-3+sqrt(7)))+exp(-20*Pi);

@Carl Love 

Yes, I know, but the procedure is recursive and I can't do that unless the procedure is wrapped in a calling one which will have to increase Digits. I wanted to keep Cf very simple, otherwise some other things could be also added.
Notice also that Digits must be increased also for x (before entering Cf(x)).
After all, it is only a toy which is not going to be often used, don't you think so?

@Axel Vogt 

Yes, and I have mentioned this possibility. This happens iff x is in C \ (D union {0,1}) where C is the Cantor set and D is the set of the endpoints of the removed intervals i.e. D = {1/3, 2/3, 1/9, 2/9, 7/9, 8/9, ... }.

This set is "small", its Lebesgue measure being 0 (it is uncountable though!).
1/4 and 1/12 are in this set and their image cannot be computed exactly, even if they are rational.
I have also mentioned a:=Sum(2/3^(n^2),n=1..infinity) for which Cf(a) is irrational.

Edit. I will have to change Cf to its (initial in fact) version

piecewise(x<1/3, Cf(3*x,n-1)/2, x<=2/3, 1/2, 1/2+Cf(3*x-2,n-1)/2)

because in its actual state the approximation is < Digits for these cases. 

@Preben Alsholm 

But I am afraid that trying this for sin(x)=-1/2 the OP will be in a total darkness.

@AmirHosein Sadeghimanesh 

H:=(f,x,j) -> quo(f,x^(degree(f,x)-j),x);

@Axel Vogt 

You are right, thank you. BTW, Cf(1/2+eps) = Cf(1/2-eps) = Cf(1/3+eps) = 1/2 obviously :-)

@Axel Vogt 

The test value for x was actually x = 1/3 - eps/3.

As I mentioned, Cf should compute the exact value of Cf(x) using Cf(x,n). On my computer Maple failed (disconnected) probably due to insufficient memory.

But, Cf(1/3 - 1/(10^40000*Pi)) can be manually computed (using Maple, of course) exactly: it is 1/2 - 3/2^83839.

(Edited typo).

 

 

First 166 167 168 169 170 171 172 Last Page 168 of 176