Kitonum

21845 Reputation

26 Badges

17 years, 235 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Carl Love  It seems to me a manifestation of some disrespect for the participants of this forum who do not have Maple 2019 (I think this applies to most of them), the writing a code that obviously does not work in Maple <2019. 

Here is almost the same code, but it also works for Maple <2019. Since Fibonacci numbers are growing very fast, the code works great for extremely large ranges (I took 10^10000 instead of 10000):

restart;
a,b:= 0,1:  
while b<10^10000 do
s:=a+b; a,b:= b,s;  
if issqr(b) then print(b) fi;
od:

                                     1
                                    144

  

Where is the system itself? Copy it here in text form (not a picture).

@goli  The  explicit  option allows you to get the roots of an equation in explicit form, of course, if possible. See acer's answer  for  TT8 .

@goli  In the first example

RootOf(_Z^2*l^2+3*_Z^4-3)

, we have a simple biquadratic equation, the roots of which are easily expressed in terms of the coefficients of this equation. The equation in your example (I named it  A ) is much more complicated and probably just there is no formula expressing the roots of this equation in terms of its coefficients. As you can see, allvalues command does not help. Only when specifying the parameter value  do we get the solution explicitly.


 

restart;
A:=RootOf(6*_Z^3+(27+3*RootOf(_Z^2*l^2+3*_Z^4-3)^2*sqrt(9-3*RootOf(_Z^2*l^2+3*_Z^4-3)^2*l^2))*_Z^2+(3*sqrt(9-3*RootOf(_Z^2*l^2+3*_Z^4-3)^2*l^2)*l^4*RootOf(_Z^2*l^2+3*_Z^4-3)^2-9*sqrt(9-3*RootOf(_Z^2*l^2+3*_Z^4-3)^2*l^2)*l^2+90*RootOf(_Z^2*l^2+3*_Z^4-3)^2*l^2-18*l^4+6*l^6*RootOf(_Z^2*l^2+3*_Z^4-3)^2-81+45*RootOf(_Z^2*l^2+3*_Z^4-3)^2*sqrt(9-3*RootOf(_Z^2*l^2+3*_Z^4-3)^2*l^2))*_Z-324-3*l^8+l^10*RootOf(_Z^2*l^2+3*_Z^4-3)^2+108*RootOf(_Z^2*l^2+3*_Z^4-3)^2*sqrt(9-3*RootOf(_Z^2*l^2+3*_Z^4-3)^2*l^2)-3*sqrt(9-3*RootOf(_Z^2*l^2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4+2*(l^4+36)^(1/2)*l^2)^(1/2)*l^6-30*(l^4+36)^(1/2)*(36+2*l^4+2*(l^4+36)^(1/2)*l^2)^(1/2)*l^4-1998*l^4-702*(l^4+36)^(1/2)*l^2-486*(36+2*l^4+2*(l^4+36)^(1/2)*l^2)^(1/2)*l^2-108*(l^4+36)^(1/2)*(36+2*l^4+2*(l^4+36)^(1/2)*l^2)^(1/2)-3888, index = 1)

(1)

nops([%]);
allvalues(Sol[1]);

4

 

RootOf(72*_Z^3+(-3*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^2+3*(l^4+36)^(1/2)*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)+324)*_Z^2+(-12*l^8+12*(l^4+36)^(1/2)*l^6-3*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^6+3*(l^4+36)^(1/2)*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^4-396*l^4+180*(l^4+36)^(1/2)*l^2-99*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^2+45*(l^4+36)^(1/2)*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)-972)*_Z-2*l^12+2*(l^4+36)^(1/2)*l^10-(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^10+(l^4+36)^(1/2)*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^8-126*l^8+90*(l^4+36)^(1/2)*l^6-48*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^6+30*(l^4+36)^(1/2)*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^4-1998*l^4+702*(l^4+36)^(1/2)*l^2-486*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)*l^2+108*(l^4+36)^(1/2)*(36+2*l^4-2*(l^4+36)^(1/2)*l^2)^(1/2)-3888, index = 1)

(2)

 


 

Download roots.mw

@tomleslie  Perfect solution. I also tried to use Fractals  package, but did not understand anything in the help. In my opinion, it is written too concisely and is very difficult to understand.
Just one note about your code - the animation is too fast. The minimum change in the last line of code allows you to make it 10 times slower:

display( [seq( doKoch(j)$10, j=0..5)], insequence, size=[500,500]);

                    

 

@Carl Love  I get it. But apparently your method is only suitable for Triangles in VectorCalculus:-int :

restart;

J:=VectorCalculus:-int(1, [x, y] = Rectangle(0 .. (1/2)*Pi, 0 .. (1/2)*Pi), inert):
value(J);

plots:-display(
    [seq](
        plot3d(0, op([1,2],j), op(2,j)),
        j= indets(J, Int(Int(algebraic, name= range(algebraic)), name= range(numeric)))
    ),
    orientation= [180, 0, 180]
);

 

@Carl Love  For triangles in  VectorCalculus:-int , your new code works. But when I tried to apply it to the same original integral, written in the usual way, an error again appears:

restart;

J:=Int(x*y,[y=0..1-x,x=0..1]):
value(J);

plots:-display(
    [seq](
        plot3d(0, op([1,2],j), op(2,j)),
        j= indets(J, Int(Int(algebraic, name= range(algebraic)), name= range(numeric)))
    ),
    orientation= [180, 0, 180]
);

 

@Carl Love  Unfortunately, this does not always work:

restart;
J:= VectorCalculus:-int(x*y, [x,y]= Triangle(<1/2,0>, <1,0>, <0,1>), inert):
plot3d(0, op([1,2], J), op(2,J), orientation= [180,0,180]);

  Error, (in plot3d) bad range arguments: x = 0 .. 1/2, -10. .. 10.
 

You should upload your worksheet here using the bold green up-arrow in the mapleprimes editor, or at least paste your complete code in text form (not a picture).

@mmcdara  You wrote "...you are not working with samples." But we can quite consider these specific data  X  and  Y  as a kind of sample. Of course, your interpretation is more natural and accurate, since when calculating the integral of an explicitly given function, information about the behavior of the function at an infinite number of points (over the entire segment) is used. However, the final results are very close.

@mapleatha  I don’t have Maple 13 to check everything, but the above method works for Maple>=2015. Try one more way. First evaluate your integral in the usual way, then create the text line by clicking the letter T on the Toolbar. Next, just copy the output of the previous calculation into this text line and manually remove the parenthesis. See the screenshot below:

 

@Carl Love  But apparently my proposal  ( 'a >= b'  in 2d math) is the simplest solution to the problem.

@nm 

1. I do not understand the meaning of the "solution" that Mathematica returns. Do you understand it?

2.Maple is simply not designed to solve differential equations with such a heap of unknown functions in one equation. If we denote it like  H(t)=F(x(t),y(t)) , then we get the correct solution:

dsolve(diff(H(t),t)=0, H(t));                        

                              H(t) = _C1

In other words, the solution is any function of the form  F(x(t),y(t))  identically equal to some constant.

First 25 26 27 28 29 30 31 Last Page 27 of 134