vv

12453 Reputation

19 Badges

9 years, 284 days

MaplePrimes Activity


These are answers submitted by vv

Why dou you think that the integral can be expressed in terms of known functions?
Note that even int(sqrt(cos(t)^2+cos(2*t)^2),t)  has a complicated form and int(sqrt(cos(t)^2+cos(3*t)^2),t)  is already too much! 

1. The parantheses are not ignored; they are not displayed, being superfluous in this case, similar to a + (b*c), due to the order of precedence of the Maple operators.

2. Unfortunately Maple does not simplify the set operators; they are used mainly for explicit sets.
If you need to check or simplify expressions in set theory, you can use the Logic package because it works practically in a Boolean algebra.

If you want the general form of a vector in the kernel, try

B := <<6,3,0>|<4,2,0>|<10,5,0>>:
K := LinearAlgebra:-NullSpace(B):
add(alpha[i]*K[i],i=1..nops(K));

(alpha[i] being arbitrary scalars.)

xodephi := {diff(x(t), t) = 16250.25391*(1 - (487*x(t))/168 + 4*Pi*x(t)^(3/2) + (274229*x(t)^2)/72576 - (254*Pi*x(t)^(5/2))/21 + (119.6109573 - (856*ln(16*x(t)))/105)*x(t)^3 + (30295*Pi*x(t)^(7/2))/1728 + (7.617741607 - 23.53000000*ln(x(t)))*x(t)^4 + (535.2001594 - 102.446*ln(x(t)))*x(t)^(9/2) + (413.8828821 + 323.5521650*ln(x(t)))*x(t)^5 + (1533.899179 - 390.2690000*ln(x(t)))*x(t)^(11/2) + (2082.250556 + 423.6762500*ln(x(t)) + 33.2307*ln(x(t)^2))*x(t)^6)*x(t)^5, diff(xphi(t), t) = 5078.204347*x(t)^(3/2), x(0) = 0.03369973351, xphi(0) = a}:  #xphi(10.92469316) = 0}:

sol := dsolve(xodephi, parameters=[a], numeric):

ff:=proc(A)
  sol(parameters=[A]);
  eval(xphi(t), sol(10.92469316))
end:

A:=fsolve(ff);
sol(parameters=[A]);
sol(10.92469316);

-467.1843838

 

[a = -467.1843838]

 

[t = 10.92469316, x(t) = HFloat(0.061040830524973895), xphi(t) = HFloat(1.6909911249030074e-9)]

(1)

plots:-odeplot(sol, [t,xphi(t)], t=0..11);

 

plots:-odeplot(sol, [t,x(t)], t=0..11);

 

 

 

The term "generalization"  is not always the right one. This happens in maths too. E.g. the Lebesgue integral is a "generalization" of the Riemann integral. However, int(sin(1/x)/x, x=0..1) does not exist  in the Lebesgue sense, but it exists as a Riemann (improper)  integral, and Maple computes it.

restart;

f maps the unit square onto the quadrilateral; ek = ellipses tangent to the unit square.

Ellipses:=proc(P::listlist(realcons), t::name, k::name)
local a1,b1,c1,a2,b2,c2,b0,c0,ek,
      f:=(x,y)->[a1*x+b1*y+c1,a2*x+b2*y+c2]/~(x+b0*y+c0);
ek:=1/2+k/2*cos(t)-sqrt(1-k^2)/2*sin(t), 1/2+sqrt(1-k^2)/2*sin(t)+k/2*cos(t);
solve(op~([f(0,0)=~P[1], f(1,0)=~P[2], f(1,1)=~P[3], f(0,1)=~P[4]]));
eval([f(ek)[], t=0..2*Pi], %)
end proc:

# Example

P:=[[0,0], [5,0], [4,3], [1,2], [0,0]]: # quadrilateral

Ell:=Ellipses(P, t, k);

[(-4-4*k*cos(t)+(-k^2+1)^(1/2)*sin(t))/(-2-(-k^2+1)^(1/2)*sin(t)), (-3-3*(-k^2+1)^(1/2)*sin(t)-3*k*cos(t))/(-2-(-k^2+1)^(1/2)*sin(t)), t = 0 .. 2*Pi]

(1)

plots:-display(plot(P,color=blue, thickness=4),
seq(plot(Ell, color=COLOR(HUE,k)), k=0..1,0.05), scaling=constrained, size=[800,800]);

 

plots:-animate(plot, [Ell], k=0..1, background=plot(P,color=blue, thickness=4), scaling=constrained);

 

 

 

 

Yes, in the implementation of series for JacobiTheta3 and JacobiTheta4, the term 1 is missing.

 

restart;

FunctionAdvisor(definition, JacobiTheta3);

[JacobiTheta3(z, q) = Sum(2*q^(_k1^2)*cos(2*_k1*z), _k1 = 1 .. infinity)+1, abs(q) < 1]

(1)

FunctionAdvisor(series, JacobiTheta3);

series(JacobiTheta3(z, q), z, 4) = series(2*(Sum(q^(_k1^2), _k1 = 1 .. infinity))-(4*(Sum(q^(_k1^2)*_k1^2, _k1 = 1 .. infinity)))*z^2+O(z^4),z,4), series(JacobiTheta3(z, q), q, 4) = series(1+(2*cos(2*z))*q+O(q^4),q,4)

(2)

 

 

I always prefer to change myself the coordinates. This way I avoid the two distinct conventions used by Maple for spherical.
As a bonus, I type less!

int(eval((x^2 + y^2)*z, [x=sin(u)*cos(v), y=sin(u)*sin(v), z=cos(u)]) * sin(u), u = 0 .. Pi/2, v = 0 .. 2*Pi);

        Pi/2

 

if type(lhs(ode),`*`) and rhs(ode)=0 then 
  ODE:=select(has, lhs(ode), diff) = 0
fi;

If lhs has a factor depending on y, but has not diff, you may keep it, or solve it for y.

restart;

x[n](t) = x0 + int( f(tau, x[n-1](tau)), tau=t0..t);

x[n](t) = x0+int(f(tau, x[n-1](tau)), tau = t0 .. t)

(1)

# example 1
t0:=0; x0:=1;
f:= (t, x) -> t*x;
x[0]:= t -> x0;

0

 

1

 

proc (t, x) options operator, arrow; x*t end proc

 

proc (t) options operator, arrow; x0 end proc

(2)

for n to 5 do
x[n] := unapply( x0 + int( f(tau, x[n-1](tau)), tau=t0..t),  t);
print(x[n]= x[n](t));
od:

x[1] = 1+(1/2)*t^2

 

x[2] = 1+(1/8)*t^4+(1/2)*t^2

 

x[3] = 1+(1/48)*t^6+(1/8)*t^4+(1/2)*t^2

 

x[4] = 1+(1/384)*t^8+(1/48)*t^6+(1/8)*t^4+(1/2)*t^2

 

x[5] = 1+(1/3840)*t^10+(1/384)*t^8+(1/48)*t^6+(1/8)*t^4+(1/2)*t^2

(3)

# exaplle 2 (x[n], f are vector valued)

t0:=0; x0:=<1,2>;
f:= (t, v) -> <t*v[1], v[2]> ;
x[0]:= t -> x0;

t0 := 0

 

Vector[column](%id = 18446747125427096142)

 

proc (t, v) options operator, arrow; `<,>`(t*v[1], v[2]) end proc

 

proc (t) options operator, arrow; x0 end proc

(4)

for n to 5 do
x[n] := unapply( x0 + int~( f(tau, x[n-1](tau)), tau=t0..t),  t);
print(x[n]= x[n](t));
od:

x[1] = (Vector(2, {(1) = 1+(1/2)*t^2, (2) = 2+2*t}))

 

x[2] = (Vector(2, {(1) = 1+(1/8)*t^4+(1/2)*t^2, (2) = t^2+2*t+2}))

 

x[3] = (Vector(2, {(1) = 1+(1/48)*t^6+(1/8)*t^4+(1/2)*t^2, (2) = 2+(1/3)*t^3+t^2+2*t}))

 

x[4] = (Vector(2, {(1) = 1+(1/384)*t^8+(1/48)*t^6+(1/8)*t^4+(1/2)*t^2, (2) = 2+2*t+(1/12)*t^4+(1/3)*t^3+t^2}))

 

x[5] = Vector[column](%id = 18446747125427074462)

(5)

 

NULL

 

Download Picard_iteration-vv.mw

 

restart;

aa := {{y = -2*X1*X2*alpha[1, 8]*alpha[2, 6]/(sqrt((X1^4*alpha[1, 8]^2*alpha[2, 4]^2 + 2*X1*((-2*X1*X2*alpha[3, 6] - 2*X2*alpha[2, 2] + 2*X3)*alpha[2, 6] + X1*X2*alpha[2, 4]*(alpha[2, 8] + alpha[3, 9]))*alpha[1, 8] + X2^2*(alpha[2, 8] + alpha[3, 9])^2)*alpha[1, 8]^2) + alpha[1, 8]^2*alpha[2, 4]*X1^2 + X2*alpha[1, 8]*(alpha[2, 8] + alpha[3, 9])), z = (-sqrt((X1^4*alpha[1, 8]^2*alpha[2, 4]^2 + 2*X1*((-2*X1*X2*alpha[3, 6] - 2*X2*alpha[2, 2] + 2*X3)*alpha[2, 6] + X1*X2*alpha[2, 4]*(alpha[2, 8] + alpha[3, 9]))*alpha[1, 8] + X2^2*(alpha[2, 8] + alpha[3, 9])^2)*alpha[1, 8]^2) - alpha[1, 8]^2*alpha[2, 4]*X1^2 + (-alpha[3, 9] - alpha[2, 8])*X2*alpha[1, 8])/(2*alpha[1, 8]^2*alpha[2, 6]*X1)}, {y = -2*X2*alpha[1, 8]*alpha[2, 6]*X1/(-sqrt((X1^4*alpha[1, 8]^2*alpha[2, 4]^2 + 2*X1*((-2*X1*X2*alpha[3, 6] - 2*X2*alpha[2, 2] + 2*X3)*alpha[2, 6] + X1*X2*alpha[2, 4]*(alpha[2, 8] + alpha[3, 9]))*alpha[1, 8] + X2^2*(alpha[2, 8] + alpha[3, 9])^2)*alpha[1, 8]^2) + alpha[1, 8]^2*alpha[2, 4]*X1^2 + X2*alpha[1, 8]*(alpha[2, 8] + alpha[3, 9])), z = (sqrt((X1^4*alpha[1, 8]^2*alpha[2, 4]^2 + 2*X1*((-2*X1*X2*alpha[3, 6] - 2*X2*alpha[2, 2] + 2*X3)*alpha[2, 6] + X1*X2*alpha[2, 4]*(alpha[2, 8] + alpha[3, 9]))*alpha[1, 8] + X2^2*(alpha[2, 8] + alpha[3, 9])^2)*alpha[1, 8]^2) - alpha[1, 8]^2*alpha[2, 4]*X1^2 + (-alpha[3, 9] - alpha[2, 8])*X2*alpha[1, 8])/(2*alpha[1, 8]^2*alpha[2, 6]*X1)}}:

bb := {{y = -2*X2*alpha[2, 6]*X1/(-sqrt(X1^4*alpha[1, 8]^2*alpha[2, 4]^2 + 2*X2*alpha[1, 8]*((alpha[2, 8] + alpha[3, 9])*alpha[2, 4] - 2*alpha[2, 6]*alpha[3, 6])*X1^2 - 4*alpha[1, 8]*alpha[2, 6]*(X2*alpha[2, 2] - X3)*X1 + X2^2*(alpha[2, 8] + alpha[3, 9])^2) + (alpha[2, 8] + alpha[3, 9])*X2 + alpha[1, 8]*alpha[2, 4]*X1^2), z = (sqrt(X1^4*alpha[1, 8]^2*alpha[2, 4]^2 + 2*X2*alpha[1, 8]*((alpha[2, 8] + alpha[3, 9])*alpha[2, 4] - 2*alpha[2, 6]*alpha[3, 6])*X1^2 - 4*alpha[1, 8]*alpha[2, 6]*(X2*alpha[2, 2] - X3)*X1 + X2^2*(alpha[2, 8] + alpha[3, 9])^2) - alpha[1, 8]*alpha[2, 4]*X1^2 + (-alpha[3, 9] - alpha[2, 8])*X2)/(2*alpha[1, 8]*alpha[2, 6]*X1)}, {y = -2*X2*alpha[2, 6]*X1/(sqrt(X1^4*alpha[1, 8]^2*alpha[2, 4]^2 + 2*X2*alpha[1, 8]*((alpha[2, 8] + alpha[3, 9])*alpha[2, 4] - 2*alpha[2, 6]*alpha[3, 6])*X1^2 - 4*alpha[1, 8]*alpha[2, 6]*(X2*alpha[2, 2] - X3)*X1 + X2^2*(alpha[2, 8] + alpha[3, 9])^2) + alpha[1, 8]*alpha[2, 4]*X1^2 + (alpha[2, 8] + alpha[3, 9])*X2), z = (-sqrt(X1^4*alpha[1, 8]^2*alpha[2, 4]^2 + 2*X2*alpha[1, 8]*((alpha[2, 8] + alpha[3, 9])*alpha[2, 4] - 2*alpha[2, 6]*alpha[3, 6])*X1^2 - 4*alpha[1, 8]*alpha[2, 6]*(X2*alpha[2, 2] - X3)*X1 + X2^2*(alpha[2, 8] + alpha[3, 9])^2) - alpha[1, 8]*alpha[2, 4]*X1^2 + (-alpha[3, 9] - alpha[2, 8])*X2)/(2*alpha[1, 8]*alpha[2, 6]*X1)}}:

aa:=simplify(rationalize(aa)):
bb:=simplify(rationalize(bb)):

indets(aa);

{X1, X2, X3, y, z, alpha[1, 8], alpha[2, 2], alpha[2, 4], alpha[2, 6], alpha[2, 8], alpha[3, 6], alpha[3, 9], ((X1^4*alpha[1, 8]^2*alpha[2, 4]^2+2*X1*((-2*X1*X2*alpha[3, 6]-2*X2*alpha[2, 2]+2*X3)*alpha[2, 6]+X1*X2*alpha[2, 4]*(alpha[2, 8]+alpha[3, 9]))*alpha[1, 8]+X2^2*(alpha[2, 8]+alpha[3, 9])^2)*alpha[1, 8]^2)^(1/2)}

(1)

indets(bb);

{X1, X2, X3, y, z, alpha[1, 8], alpha[2, 2], alpha[2, 4], alpha[2, 6], alpha[2, 8], alpha[3, 6], alpha[3, 9], (X1^4*alpha[1, 8]^2*alpha[2, 4]^2+2*X2*alpha[1, 8]*(-2*alpha[3, 6]*alpha[2, 6]+alpha[2, 4]*(alpha[2, 8]+alpha[3, 9]))*X1^2-4*alpha[1, 8]*alpha[2, 6]*(X2*alpha[2, 2]-X3)*X1+X2^2*(alpha[2, 8]+alpha[3, 9])^2)^(1/2)}

(2)

ra:=indets(aa,radical)[]:
rb:=indets(bb,radical)[]:

simplify(ra^2/rb^2);

alpha[1, 8]^2

(3)

AA:=eval(aa, [ra=R*s*t, alpha[1,8]=t]):  # So, s = +1 or -1

BB:=eval(bb, [rb=R, alpha[1,8]=t]):

simplify( eval(y, AA[1])-eval(y,BB[1]) ), simplify( eval(z, AA[1])-eval(z,BB[1]) );
simplify( eval(y, AA[2])-eval(y,BB[2]) ), simplify( eval(z, AA[2])-eval(z,BB[2]) );

(1/2)*X2*R*(s-1)/(t*((X1*alpha[3, 6]+alpha[2, 2])*X2-X3)), -(1/2)*R*(s-1)/(t*alpha[2, 6]*X1)

 

-(1/2)*X2*R*(s-1)/(t*((X1*alpha[3, 6]+alpha[2, 2])*X2-X3)), (1/2)*R*(s-1)/(t*alpha[2, 6]*X1)

(4)

simplify( eval(y, AA[1])-eval(y,BB[2]) ), simplify( eval(z, AA[1])-eval(z,BB[2]) );
simplify( eval(y, AA[2])-eval(y,BB[1]) ), simplify( eval(z, AA[2])-eval(z,BB[1]) );

(1/2)*X2*R*(s+1)/(t*((X1*alpha[3, 6]+alpha[2, 2])*X2-X3)), -(1/2)*R*(s+1)/(t*alpha[2, 6]*X1)

 

-(1/2)*X2*R*(s+1)/(t*((X1*alpha[3, 6]+alpha[2, 2])*X2-X3)), (1/2)*R*(s+1)/(t*alpha[2, 6]*X1)

(5)

# ==> aa = bb even for complex parameters

 

 

restart;
ic:=[y(0)=0,D(y)(0)=3];
s:=Physics:-Latex(ic, output=string);
s1:=StringTools:-SubstituteAll(s, "D\\left(y \\right)", "y'");   # or,
s2:=StringTools:-SubstituteAll(s, "D\\left(y \\right)", "y^{\\prime}");

 

Try to prove (without Maple) the nice formulae due to G. Polya.

Int(x^(-x), x=0..1) = Sum(n^(-n), n=1..infinity);
Int(x^(x), x=0..1) = Sum((-1)^(n-1)*(n)^(-n), n=1..infinity);

Int(x^(-x), x = 0 .. 1) = Sum(n^(-n), n = 1 .. infinity)

 

Int(x^x, x = 0 .. 1) = Sum((-1)^(n-1)*n^(-n), n = 1 .. infinity)

(1)

evalf([%%,%])

[1.291285997 = 1.291285997, .7834305107 = .7834305107]

(2)

 

JordanForm does non accept numeric matrices containing floats, because the Jordan form is very unstable numericallly (and SingularValues is recommended for numeric tasks).

(Rank is also unstable, but it accepts floats; probably it is considered "less unstable").

Of course it's possible to cheat e.g. JordanForm(A+'sin(0)')  or convert to rationals.

 

@Stretto You want to use your own syntax! Note that Maple already has the operators `--` and `++`.

a:=10: b:=100:
a--+b;  [a,b];
                             a := 9
                              110
                            [9, 100]
 
First 25 26 27 28 29 30 31 Last Page 27 of 111