vv

13827 Reputation

20 Badges

9 years, 316 days

MaplePrimes Activity


These are answers submitted by vv

B:=copy(A);
Or,
B:=Matrix(A);

It is easy to see that this matrix was specially cooked to have no sqrt.

Its Jordan form is:

JordanForm(A);

but the first 2x2 block  [[0,1], [0,0]] does not have a square root, so A neither.

 

Edit.  Unfortunately I made a stupid (but hard to detect) mistake. The fact that a Jordan block does not have a sqrt does not imply that that the  whole Jordan form does not have sqrt; only the converse is true.

In this case, sqrt(A) exists (not unique of course) and can be computed. It is:

B:=Matrix(9, 9, [[2203/369+(41/135)*sqrt(5), 8665/1476+(14/45)*sqrt(5), 1145/246+(43/135)*sqrt(5), -1687/492+(44/135)*sqrt(5), 28/41+(1/3)*sqrt(5), -3979/1476+(46/135)*sqrt(5), -1315/738+(47/135)*sqrt(5), 125/492+(16/45)*sqrt(5), -3515/369+(49/135)*sqrt(5)], [-11015/1476+(41/135)*sqrt(5), -102365/5904+(14/45)*sqrt(5), 917/984+(43/135)*sqrt(5), 7451/1968+(44/135)*sqrt(5), -99/164+(1/3)*sqrt(5), 61223/5904+(46/135)*sqrt(5), -14089/2952+(47/135)*sqrt(5), 6263/1968+(16/45)*sqrt(5), 17575/1476+(49/135)*sqrt(5)], [4753/1476+(41/135)*sqrt(5), 102187/5904+(14/45)*sqrt(5), -5875/984+(43/135)*sqrt(5), -5149/1968+(44/135)*sqrt(5), -11/164+(1/3)*sqrt(5), -70897/5904+(46/135)*sqrt(5), 28319/2952+(47/135)*sqrt(5), -5281/1968+(16/45)*sqrt(5), -10001/1476+(49/135)*sqrt(5)], [-9539/1476+(41/135)*sqrt(5), -97937/5904+(14/45)*sqrt(5), 1409/984+(43/135)*sqrt(5), 7943/1968+(44/135)*sqrt(5), -99/164+(1/3)*sqrt(5), 59747/5904+(46/135)*sqrt(5), -15565/2952+(47/135)*sqrt(5), 4787/1968+(16/45)*sqrt(5), 16099/1476+(49/135)*sqrt(5)], [7705/1476+(41/135)*sqrt(5), 111043/5904+(14/45)*sqrt(5), -4891/984+(43/135)*sqrt(5), -4165/1968+(44/135)*sqrt(5), -11/164+(1/3)*sqrt(5), -73849/5904+(46/135)*sqrt(5), 25367/2952+(47/135)*sqrt(5), -8233/1968+(16/45)*sqrt(5), -12953/1476+(49/135)*sqrt(5)], [-5111/1476+(41/135)*sqrt(5), -72845/5904+(14/45)*sqrt(5), 1901/984+(43/135)*sqrt(5), 5483/1968+(44/135)*sqrt(5), 65/164+(1/3)*sqrt(5), 55319/5904+(46/135)*sqrt(5), -19993/2952+(47/135)*sqrt(5), 359/1968+(16/45)*sqrt(5), 11671/1476+(49/135)*sqrt(5)], [10657/1476+(41/135)*sqrt(5), 113995/5904+(14/45)*sqrt(5), -2923/984+(43/135)*sqrt(5), -7117/1968+(44/135)*sqrt(5), 153/164+(1/3)*sqrt(5), -64993/5904+(46/135)*sqrt(5), 16511/2952+(47/135)*sqrt(5), -9217/1968+(16/45)*sqrt(5), -15905/1476+(49/135)*sqrt(5)], [-11015/1476+(41/135)*sqrt(5), -137789/5904+(14/45)*sqrt(5), 4853/984+(43/135)*sqrt(5), 7451/1968+(44/135)*sqrt(5), -99/164+(1/3)*sqrt(5), 84839/5904+(46/135)*sqrt(5), -25897/2952+(47/135)*sqrt(5), 10199/1968+(16/45)*sqrt(5), 17575/1476+(49/135)*sqrt(5)], [4753/1476+(41/135)*sqrt(5), 49051/5904+(14/45)*sqrt(5), 29/984+(43/135)*sqrt(5), -5149/1968+(44/135)*sqrt(5), -11/164+(1/3)*sqrt(5), -35473/5904+(46/135)*sqrt(5), 10607/2952+(47/135)*sqrt(5), 623/1968+(16/45)*sqrt(5), -10001/1476+(49/135)*sqrt(5)]]);

# Proof:
Norm(A - B^2);
        0

 

 

delta is supposed to be in 0 .. 1

Then max(min(...)) = 1 - delta.

==> lim = 1 - delta

[You must use maths, not Maple for this].

Ok, I understand, when you write minimize, you mean maximize   :-)

In this case, maximize(abs(x^(2^(-t))-1),x=1-delta .. 1+delta);
equals (1-delta)^(2^(-t))  for t>0   [ hint:  u |--> (1+u)^alpha  is concave in (-1,1)  for 0 < alpha < 1 ]
Hence the limit (t--> oo) is:

limit((1-delta)^(2^(-t)), t=infinity);
                               1

 

You mean

g := (t,delta) -> minimize(abs(x^(2^(-t))-1),x=1-delta .. 1+delta);

But anyway g(t,delta) = 0, so the limit is 0 too.

It seems that all the plottools commands accept only Cartesian coordinates.
But, it is possible to use changecoords after that.

with(plots):with(plottools):
p1:=display(line([1,Pi/4],[2,Pi/2])):
p2:=changecoords(p1,polar):
display(p1,p2);

 

It is possible but not a very good idea.

You must rename your Rr procedure e.g. to RrProc because a table and a procedure cannot have the same name.

For example:
RrProc := proc(x,y)  x + y end proc:

`index/xxx` := proc(L) RrProc(op(L)) end proc: 
Rr := table(xxx):

Rr[6,7];
    13

From Programming Guide:

"The time to perform an indexed look-up into a list, set, table, and Array are all constant time operations.  This means that the time needed to find the element does not vary based on the number of elements stored in the structure. Time to perform a look-up into a list or set is relatively similar and is faster than Arrays, which is faster than a table.
Similarly, writing into a table or Array is also a constant time operation, with Array look-ups being slightly faster than table look-ups."

 

The system in Mathematica is not the same with yours.
Anyway, you cannot have FQ(...)=0  as equation because FQ>0.

As an example, this works:

restart;
FM := (q, Jo, T) -> evalf( Int((1/2)*exp(-(1/2)*z^2)*Jo*sqrt(2)*(1-tanh(sqrt(q)*z/T)^2)/(sqrt(Pi)*T), z = -infinity .. infinity) ):
FQ := (q, Jo, T) -> evalf( Int((1/2)*exp(-(1/2)*z^2)*sqrt(2)*sqrt(q)^2*z^2/(T^2*sqrt(Pi)), z = -infinity .. infinity) ):
Sol := T -> fsolve({FM(q, Jo, T) - 1, FQ(q, Jo, T) - 2}, {Jo, q}):
Sol(.6);

        {Jo = 1.249936841, q = .7200000001}

 

As roman_pearce  said, it seems to be a parser bug.
A workaround would be to replace `*` with `&*` and then define `&*` as usual multiplication

restart;
s:="((((o * (((h * h - h * v) * (a * h - a * v) * h * h * h * h * a * a * h - h * h * h * a * a * h * o * (h * h - h * v) * (a * h - a * v)) * a * a * h * h * h * h * h - h * h * h * a * a * h * h * h * h * h * a * a * h * (a * h - a * o) * (h * h - h * v) * (h - v)) * h * a * a * h * h * h * h * a * a * h * a * a * h * h * h * h * h - h * h * h * a * a * h * h * h * h * h * a * a * h * a * a * h * h * h * h * h * ((v * (a * h - a * v) * h * h * h * a * a * h - h * a * a * h * (h * h - h * v) * v * (a * h - a * v)) * a * a * h * h * h * h * h - h * a * a * h * h * h * h * a * a * h * (a * h - a * o) * (v * h * h * h - h * (h * h - h * v) * v))) * h * a * a * h * h * a * a * h * a * a * h * h - h * h * h * a * a * h * h * h * h * h * a * a * h * a * a * h * h * h * h * h * h * a * a * h * h * h * h * a * a * h * a * a * h * h * h * h * h * o * (((a * h - a * v) * h * a * a * h - a * a * h * o * (a * h - a * v)) * a * a * h * h - a * a * h * h * a * a * h * (a * h - a * o) * (h - v))) * h * h * a * a * h * h * h * h * a * a * h * a * a * h * h * h * h * h - h * h * h * a * a * h * h * h * h * h * a * a * h * a * a * h * h * h * h * h * h * a * a * h * h * h * h * a * a * h * a * a * h * h * h * h * h * h * a * a * h * h * a * a * h * a * a * h * h * (o * (v * (a * h - a * v) * h * h * h * a * a * h - h * a * a * h * (h * h - h * v) * v * (a * h - a * v)) * a * a * h * h * h * h * h - h * a * a * h * h * h * h * a * a * h * (a * h - a * o) * (v * v * h * h * h - h * (h * h - h * v) * v * v))) );":
# length(s);
expand(parse(s));  # wrong
ss:=StringTools:-SubstituteAll(s, "*","&*"):
# `&*` := (x,y) -> x*y;
`&*` := `*`:
expand(parse(ss));  # OK

Edit. Instead of defining explicitely `&*` we may use:

expand(eval(parse(ss),`&*`=`*`));

 

If the expression in pasted in a new worksheet ==>

-a^23*h^100*o*v^2+a^23*h^100*v^3-a^23*h^40*o*v^2+a^23*h^40*v^3

Pasting again with an assignment  ex := ...    ==>

ex := -a^23*h^70*o*v^2+a^23*h^70*v^3-a^23*h^40*o*v^2+a^23*h^40*v^3

copyp.mw

But your code works.
The only thing I did was to copy it in a new worksheet (1d math, worksheet mode) and fill some ";",
because I never debug in document mode.

restart;
with(plots):
with(plottools):
Cylinder := proc (a::list, b::list, dia := .1, colr := "Blue"): 
plots:-arrow(a, b, width = dia, shape = cylindrical_arrow, head_length = 0., head_width = 0.1e-1, colour = colr) 
end proc:
Body2 := display([point([1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([-1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([0, 1, 0], colour = purple, symbolsize = 50, symbol = solidsphere), Cylinder([0, 0, 0], [1, -.2, 0], 0.75e-1, "Red"), Cylinder([0, 0, 0], [1, -.2, -0.1e-1], 0.75e-1, "Nautical GrayViolet"), Cylinder([0, 0, 0], [-1, -.2, 0], 0.75e-1, "Red"), Cylinder([0, 0, 0], [-1, -.2, -0.1e-1], 0.75e-1, "Nautical GrayViolet"), Cylinder([0, 0, 0], [0, 1, 0], 0.65e-1, "Green"), Cylinder([0, 0, 0], [0, 1, -0.1e-1], 0.65e-1, "Nautical GrayViolet"), line([0, 0, 0], [.5, 0, 0], colour = red, thickness = 4), line([0, 0, 0], [0, .5, 0], colour = yellow, thickness = 4), line([0, 0, 0], [0, 0, .5], colour = blue, thickness = 4), plots:-textplot3d([.5, 0.5e-1, 0, "X"]), plots:-textplot3d([.1, .5, 0, "Y"]), plots:-textplot3d([0.5e-1, 0, .5, "Z"])], scaling = constrained);
w1 := .35; w2 := .45; w3 := .15;
animate( rotate, [Body2,w1*t,w2*t,w3*t], t=0..8*Pi,frames=100 );

For rotate alone, you must use e.g.

t:=Pi;
display(rotate(Body2, -w1*t, -w2*t, -w3*t));

rota.mw

Are you sure that the ODE has a solution? Explore suggests that it has not.

restart;
Digits := 15:
alpha := evalf(2*Pi*(1/180)); EP := .2; lambda := .1; HA := 5; RE := 20;
ODE := (1+EP)*(((D@@3)(F))(r)+4*alpha^2*(D(F))(r))+2*alpha*RE*F(r)*(D(F))(r)-HA*alpha^2*(D(F))(r)-3*EP*lambda*((1/2)*(D(F))(r)^2*((D@@3)(F))(r)+(D(F))(r)*((D@@2)(F))(r)^2)/alpha^2-EP*lambda*(72*F(r)^2*(D(F))(r)+2*(D(F))(r)^3+32*F(r)*(D(F))(r)*((D@@2)(F))(r)+2*F(r)^2*((D@@3)(F))(r)) = 0:
#BCSforNum := F(0) = 1, (D(F))(0) = 0, F(1) = 0;
BCS :=        F(0) = 1, (D(F))(0) = 0, (D@@2)(F)(0) = a:
sol := dsolve({ODE, BCS}, numeric, parameters=[a], 'output'='listprocedure'):
P:=proc(A)
  sol('parameters'=['a'=A]); sol;
  plots:-odeplot(sol, [r, F(r)], r = 0 .. 1) 
end proc:
Explore(P(A),'parameters'=[A=-100. ..  100.],initialvalues=[A=0] );

 


You don't need Maple: the function is odd, so, the integral is 0.

First 92 93 94 95 96 97 98 Last Page 94 of 120