Kitonum

21845 Reputation

26 Badges

17 years, 235 days

MaplePrimes Activity


These are replies submitted by Kitonum

@tomleslie  Your code does not work in Maple 2018.2 and probably in many earlier versions. This is a famous bug. But there is a simple workaround. You just need to increase  Digits .
 

restart; with(Optimization)

LPSolve(5*x1+2*x2+7*x3+6*x4+x5+6*x6+8*x7+6*x8, {10*x1+9*x2+15*x3+3*x4+11*x5+6*x6+3*x7+4*x8 <= 22}, assume = {integer, nonnegative}, maximize = true)

Warning, problem appears to be unbounded

 

[0, [x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 0, x8 = 0]]

(1)

NULL

Digits:=20:
LPSolve(5*x1+2*x2+7*x3+6*x4+x5+6*x6+8*x7+6*x8, {10*x1+9*x2+15*x3+3*x4+11*x5+6*x6+3*x7+4*x8 <= 22}, assume = {integer, nonnegative}, maximize = true);

[56, [x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 7, x8 = 0]]

(2)

``


 

Download intOpt_new.mw

Your code does not work, because the grid is not small enough. See help about  gridrefine  option in  plots:-implicitplot . The following code works:

restart; 
with(plots, implicitplot):
implicitplot(2+r*(b-2)*sqrt(b-1), b = -10 .. 10, r = -10 .. 10, scaling = constrained, gridrefine = 3);

 

@Ali Guzel  See update to my answer above.

@acer  I used another way to estimate the time, because

CodeTools:-Usage(Student:-Calculus1:-Roots(Eq, x=3*Pi/2..5*Pi)); 

hangs on my computer (I use Maple 2018.2)

Read this article  https://en.wikipedia.org/wiki/Euler_method  before writing your program. I think you yourself do not really understand what you wrote.

The polynomial is more convenient to specify as a procedure:

P := x -> a0*x^3+a1*x^2+a2*x+a3:

You have 4 unknown coefficients and 4 conditions. Make a system of equations to find them.

@Rouben Rostamian   Of course, it’s good for everyone to know that this is called the shoelace formula  https://en.wikipedia.org/wiki/Shoelace_formula 

restart:
Fib:= proc(n)
option remember;
    if n=1 then return 1
    elif n=2 then return 2
    else Fib(n-1)+Fib(n-2)
    fi;
end proc:

Fib(30);

 

@goli Do you want several arrows on one curve?

A:=plot(x^2, x=0..3, color=red, thickness=3):
x0:=1.5:
B:=seq(plots:-arrow([x0,x0^2], 0.7*[1,2*x0], color=blue, head_width=0.15, head_length=0.4, shape=arrow), x0=[0.5,1.5,2.2]):
plots:-display(A, B);

          

 

@goli 

A:=plot(x^2, x=0..3, color=red, thickness=3):
x0:=1.5:
B:=plots:-arrow([x0,x0^2], [1,2*x0], color=blue, head_width=0.15, head_length=0.4, shape=arrow):
plots:-display(A, B);

                

 

@baharm31  I do not think that's possible.
Try

dsolve(odeA, {x(t),q(t)});


Maple returns  NULL .


Edit. If you want to investigate how solutions change depending on parameter changes, then you can use  Explore  command.

JAMET wrote:
"Let Q be a quadrilateral which has a inscribed circle and a circumscribed circle. Show that the centers of these 2 circles and the point of intersection of the diagonals of the quadrilateral are aligned."   

The proof of this statement for the general case can be read here  http://mathhelpplanet.com/viewtopic.php?f=28&t=68666   ( chebo's post, in Russian).

@Vrighty  It seems you did not understand me. When you are not using indexes, you should use eval command with your approach. With indexes you can not use eval:

restart;
F(y):=A+B+C;
A:=10*y;
B:=y²-4;
C:=5-y;
F(y):=eval(F(y));

F[y]:=A+B+C;
A:=10*y;
B:=y²-4;
C:=5-y;
F[y]:=F[y]; 

                             

 

@Thomas Dean  I do not know how to do this programmatically in the general case. You see that, as Thomas Richard pointed out, Maple 2020 successfully handled this example. Maybe one of the Maple developers will answer your questions.

@Carl Love  Thank you for your detailed analysis (vote up). 

Since this set of points on the plane is described by the polynomial equation  P(x)=0 ,
where  P(x)=x^8+4*x^6*y^2+6*x^4*y^4+4*x^2*y^6+y^8-12*x^7-36*x^5*y^2-36*x^3*y^4-12*x*y^6+252*x^6+324*x^4*y^2-108*x^2*y^4-180*y^6-5184*x^3*y^2-5184*x*y^4+7776*x^4+23328*y^4+116640*x^3+209952*x*y^2+839808*x^2+2519424*x+3779136-1944^2 ,
it would be great if we could split this polynomial  P(x)  into the product of 3 polynomials corresponding to each connected curve.

 

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