vv

13837 Reputation

20 Badges

9 years, 326 days

MaplePrimes Activity


These are replies submitted by vv

@ThU 

Yes, this is what MakeInert does (automatically).

@mmcdara 

I just see that the two parameters are switched compared with some (all?)  standard references.
Have you noticed a bug related to this? As long as Maple is consistent, it seems to be OK.

Even in mathematics the notations are not standardized.
E.g. for some authors N = {0,1,2,...}  but for others N = {1,2,...}.

A much more annoying situation in Maple is that the conventions are not the same everywhere:

spherical coordinates in plot3d:
x = u cos(v) sin(w)
y = u sin(v) sin(w)
z = u cos(w)

spherical coordinates in  VectorCalculus:
x = u cos(w) sin(v)
y = u sin(v) sin(w)
z = u cos(v)

i.e. phi and theta are switched!

@Carl Love 

I agree for frem but not for trunc  which satisfies the identity  frac(x)+trunc(x) = x.
Being built in is not necessarily relevant; probably frac(x) should be more often replaced (internally)  by x - trunc(x).

@Markiyan Hirnyk 
Don't you also think that the last sentence could have been omitted?

@Carl Love 

The non-analytic functions frac, trunc, floor etc do not like calculus.
They seem to have incomplete implementations.
frac(x)+trunc(x)  is not simplified to x  and
simplify(floor(u)) assuming u<4,u>3;  remains unsimplified.
 

Edit. Using trunc, Maple gives the corect result.

s := x -> min(frac(x),1-frac(x)):
b := x -> sum(s(2^n*x)/2^n, n=0..4):
L:=Limit( ( b(x)-b(181/20) )/(x-181/20), x=181/20 ):
value(L);

                               0
LL:=eval(L, frac=(t -> t - trunc(t)) ):
value(LL);

                               3

 

@tomleslie 

Your version is nice too.
For my version two conditions were imposed:
(1)  Each quadrilateral (black or white) is a rhombus.
(2) The first 32 black rhombuses (the fat ones) are actually squares.
These two conditions determine uniquely the tiling (except the circle in the middle, of course), and it seems that the original tiling satisfies (1)+(2).

 

@Klausklabauter 

It's not clear (at least for me) what is your final goal.
If you want the LDL decomposition then you can obtain it with 3 lines of code as shown. The complexity compared with a direct LDL algorithm is almost the same. You must have huge matrices to see a (marginal) difference.

 

@Annonymouse 

Basis returns the primitive parts of the polynomials, i.e. applies the primpart procedure (see ?primpart) to the "true" reduced basis. Note that this "basis" is also unique and has the advantage of not having non-integer coefficients.

It would be interesting to try this for t=1/10 instead of t=1.

@Mariusz Iwaniuk 

@weidade37211 

restart;
interface(version);

 Standard Worksheet Interface, Maple 2018.1, Windows 7, June 8  2018 Build ID 1321769
with(Statistics):
p1 := RandomVariable(BetaDistribution(1, 100)):
p2 := RandomVariable(BetaDistribution(1, 50)):
CodeTools:-Usage(
evalf(Int(z*PDF(0.3*p1+0.7*p2, z, inert), z = 0 .. 1))
);

memory used=0.56GiB, alloc change=142.00MiB, cpu time=6.33s, real time=6.18s, gc time=530.40ms
                         0.01669578722

 

@weidade37211 

As you see, this way it's computed fast too.

@aarjav 
It works for me.
BTW, note that Zeta is a built in function (Riemann Zeta). Probably you want zeta.

Here is a procedure for this.


 

restart;

IgnoreTerms:=proc(Ex::`+`, vars::list(function))
local dd,ddd,DD,EX,F,Z,i;
dd:=[indets(Ex,specfunc(diff))[]]:
DD:=[seq(ddd[i],i=1..nops(dd))]:
EX:=eval(Ex, dd=~DD):
F:= u -> `if`(limit(eval(u, vars=~Z)/Z,Z=0)=0, 0, u):
eval(map(F, EX), DD=~dd);
end:

alias(beta = beta(t), Zeta = Zeta(t), theta = theta(t));

beta, Zeta, theta

(1)

YourEx := 2428.922250*(diff(beta, t, t))+33032*beta-18.43200000*cos(psi)*beta*(sin(delta__3)^3)*p*r-36.86400000*(cos(delta__3)^3)*Zeta*beta*(sin(delta__3)^3)*((diff(theta, t))^2)-429.7500000*U*cos(psi)*sin(delta__3)*Zeta*Zeta(1, t)+16342.88754*cos(psi)*(beta^3)*sin(delta__3)*q-3416.512500*V*sin(psi)*beta*sin(delta__3)*Zeta*(theta^2)-429.7500000*V*sin(psi)*sin(delta__3)*Zeta*Zeta(1, t)-16342.88754*sin(psi)*beta*sin(delta__3)*p*Zeta+9.216000000*sin(psi)*sin(delta__3)*(cos(delta__3)^4)*q*(diff(theta, t))-5809.338000*cos(psi)*beta*sin(delta__3)*p*(diff(theta, t))-3.456000000*cos(psi)*beta*sin(delta__3)*p*r+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*Zeta(1, t)+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*r+5805.882000*cos(psi)*beta*cos(delta__3)*q*(diff(theta, t))+2704.842000*cos(psi)*sin(delta__3)*q*Zeta*r+1.728000000*cos(psi)*sin(delta__3)*q*theta*(diff(theta, t));

2428.922250*(diff(diff(beta, t), t))+33032*beta-18.43200000*cos(psi)*beta*sin(delta__3)^3*p*r-36.86400000*cos(delta__3)^3*Zeta*beta*sin(delta__3)^3*(diff(theta, t))^2-429.7500000*U*cos(psi)*sin(delta__3)*Zeta*Zeta(1, t)+16342.88754*cos(psi)*beta^3*sin(delta__3)*q-3416.512500*V*sin(psi)*beta*sin(delta__3)*Zeta*theta^2-429.7500000*V*sin(psi)*sin(delta__3)*Zeta*Zeta(1, t)-16342.88754*sin(psi)*beta*sin(delta__3)*p*Zeta+9.216000000*sin(psi)*sin(delta__3)*cos(delta__3)^4*q*(diff(theta, t))-5809.338000*cos(psi)*beta*sin(delta__3)*p*(diff(theta, t))-3.456000000*cos(psi)*beta*sin(delta__3)*p*r+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*Zeta(1, t)+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*r+5805.882000*cos(psi)*beta*cos(delta__3)*q*(diff(theta, t))+2704.842000*cos(psi)*sin(delta__3)*q*Zeta*r+1.728000000*cos(psi)*sin(delta__3)*q*theta*(diff(theta, t))

(2)

YourResult := 2428.922250*(diff(beta, t, t))+33032*beta-18.43200000*cos(psi)*beta*(sin(delta__3)^3)*p*r-429.7500000*U*cos(psi)*sin(delta__3)*Zeta*Zeta(1,t)-429.7500000*V*sin(psi)*sin(delta__3)*Zeta*Zeta(1, t)+9.216000000*sin(psi)*sin(delta__3)*(cos(delta__3)^4)*q*(diff(theta, t))-5809.338000*cos(psi)*beta*sin(delta__3)*p*(diff(theta, t))-3.456000000*cos(psi)*beta*sin(delta__3)*p*r+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*Zeta(1, t)+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*r+5805.882000*cos(psi)*beta*cos(delta__3)*q*(diff(theta, t))+2704.842000*cos(psi)*sin(delta__3)*q*Zeta*r+1.728000000*cos(psi)*sin(delta__3)*q*theta*(diff(theta, t));

2428.922250*(diff(diff(beta, t), t))+33032*beta-18.43200000*cos(psi)*beta*sin(delta__3)^3*p*r-429.7500000*U*cos(psi)*sin(delta__3)*Zeta*Zeta(1, t)-429.7500000*V*sin(psi)*sin(delta__3)*Zeta*Zeta(1, t)+9.216000000*sin(psi)*sin(delta__3)*cos(delta__3)^4*q*(diff(theta, t))-5809.338000*cos(psi)*beta*sin(delta__3)*p*(diff(theta, t))-3.456000000*cos(psi)*beta*sin(delta__3)*p*r+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*Zeta(1, t)+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*r+5805.882000*cos(psi)*beta*cos(delta__3)*q*(diff(theta, t))+2704.842000*cos(psi)*sin(delta__3)*q*Zeta*r+1.728000000*cos(psi)*sin(delta__3)*q*theta*(diff(theta, t))

(3)

Result:=IgnoreTerms(YourEx,[beta,Zeta,theta]);

2428.922250*(diff(diff(beta, t), t))+33032*beta-18.43200000*cos(psi)*beta*sin(delta__3)^3*p*r-429.7500000*U*cos(psi)*sin(delta__3)*Zeta*Zeta(1, t)-429.7500000*V*sin(psi)*sin(delta__3)*Zeta*Zeta(1, t)+9.216000000*sin(psi)*sin(delta__3)*cos(delta__3)^4*q*(diff(theta, t))-5809.338000*cos(psi)*beta*sin(delta__3)*p*(diff(theta, t))-3.456000000*cos(psi)*beta*sin(delta__3)*p*r+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*Zeta(1, t)+149.6160000*cos(psi)*sin(delta__3)*cos(delta__3)*p*r+5805.882000*cos(psi)*beta*cos(delta__3)*q*(diff(theta, t))+2704.842000*cos(psi)*sin(delta__3)*q*Zeta*r+1.728000000*cos(psi)*sin(delta__3)*q*theta*(diff(theta, t))

(4)

Result-YourResult;

0

(5)

 


 

Download IgnoreTerms.mw

@aarjav 

Your expressions are written incorrectly. You must use the argument t: so, theta(t) instead of theta etc.
Note that diff(theta, t) = 0diff(beta, t, t) = 0 (without arguments).

[Actually it is possible to use alias(theta=theta(t)) but I'd recommend to avoid this at least for the moment].
Note also that zeta and Zeta are distinct objects.

It would be better to have either o formal description of the expression or a complete (not too long) example + the desired result.

First 81 82 83 84 85 86 87 Last Page 83 of 176