Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

The function n->ceil(sqrt(4*n))-floor(sqrt(2*n))-1 counts the number of squares strictly between 2n and 4n.

Maple 2016 gives the same output as what I get when I create a plot here: plot(ceil(sqrt(4*n))-floor(sqrt(2*n))-1,n=10..100)

Note, however, that Maple does not plot at least the point of interest (72.4), which is nevertheless an element of the graph:

[10, 2], [11, 2], [12, 2], [13, 2], [14, 2], [15, 2], [16, 2], [17, 3], [18, 2], [19, 2], [20, 2], [21, 3], [22, 3], [23, 3], [24, 3], [25, 2], [26, 3], [27, 3], [28, 3], [29, 3], [30, 3], [31, 4], [32, 3], [33, 3], [34, 3], [35, 3], [36, 3], [37, 4], [38, 4], [39, 4], [40, 4], [41, 3], [42, 3], [43, 4], [44, 4], [45, 4], [46, 4], [47, 4], [48, 4], [49, 4], [50, 4], [51, 4], [52, 4], [53, 4], [54, 4], [55, 4], [56, 4], [57, 5], [58, 5], [59, 5], [60, 5], [61, 4], [62, 4], [63, 4], [64, 4], [65, 5], [66, 5], [67, 5], [68, 5], [69, 5], [70, 5], [71, 5], [72, 4], [73, 5], [74, 5], [75, 5], [76, 5], [77, 5], [78, 5], [79, 5], [80, 5], [81, 5], [82, 6], [83, 6], [84, 6], [85, 5], [86, 5], [87, 5], [88, 5], [89, 5], [90, 5], [91, 6], [92, 6], [93, 6], [94, 6], [95, 6], [96, 6], [97, 6], [98, 5], [99, 5], [100, 5]

What's going wrong here?
Regards
Prof.G

Have you ever wanted to create practice problems and quizzes that use buttons and other features to support a student making their way to an answer, such as the following?

Let’s take a look at how you can use Maple 2022 to create documents like these that can be deployed in Maple Learn. I know I’ve always wanted to learn, so let’s learn together. All examples have a document that you can use to follow along, found here, in Maple Cloud.  

The most important command you’ll want to take a look at is ShareCanvas. This command generates a Maple Learn document. Make sure to remember that command, instead of ShowCanvas, so that the end result gives you a link to a document instead of showing the results in Maple. You’ll also want to make sure you load the DocumentTools:-Canvas subpackage using with(DocumentTools:- Canvas).

If you take a look at our first example, below, the code may seem intimidating. However, let’s break it down, I promise it makes sense!

with(DocumentTools:-Canvas);
cv := NewCanvas([Text("Volume of Revolution", fontsize = 24), "This solid of revolution is created by rotating", f(x) = cos(x) + 1, Text("about the y=0 axis on the interval %1", 0 <= x and x <= 4*Pi), Plot3D("Student:-Calculus1:-VolumeOfRevolution(cos(x) + 1, x = 0 .. 4*Pi, output = plot, caption=``)")]);
ShareCanvas(cv);

The key command is Plot3D. This plots the desired graph and places it into a Maple Learn document. The code around it places text and a math group containing the equation being graphed. 


Let’s take a look at IntPractice now. The next example allows a student to practice evaluating an integral.

with(Grading):
IntPractice(Int(x*sin(x), x, 'output'='link'));

 This command allows you to enter an integral and the variable of integration, and then evaluates each step a student enters on their way to finding a result. The feedback given on every line is incredibly useful. Not only will it tell you if your steps are right, but will let you know if your last line is correct, i.e if the answer is correct.

Finally, let’s talk about SolvePractice.

with(Grading):
SolvePractice(2*x + 3 = 6*x - 9, 'output' = 'link');

This command takes an equation, and evaluates it for the specified variable. Like the IntPractice command, this command will check your steps and provide feedback. The image below shows how this command looks in Maple 2022.

These commands are the stepping stones for creating practice questions in Maple Learn. We can do so much more in Maple 2022 scripting than I realized, so let’s continue to learn together!

Some other examples of scripted documents in the Maple Learn Document Gallery are our steps documents, this document on the Four Color Visualization Theorem, and a color by numbers. As you can see, there’s a lot that can be done with Maple Scripting.

 Let us know in the comments if you’d like to see more on Maple 2022 scripting and Maple Learn.

hello 
i want to reflect a plot i have j:= plot(y(x),x=0..35) ,y(x) icludes heavside functions around  x=17.5 , for some reason maple using reflect function keeps returning the reflected function in the output and not just the plot. i would like to get rid of it .

reflect(j,[[17.5,0],[17.5,15]])
output : the reflected function of y(x)
the reflected graph. 

thanks for the help 

Hello,

I want to solve three coupled differential equations with initial and boundary conditions numerically and get the plots of solutions.

But I received errors.

Could you please help me to solve the error and get all three plots that I need?

My codes:

restart;

sys := {diff(phi(eta), eta$2) + 5.261282735*f(eta)*diff(phi(eta), eta) - 2.630641368*phi(eta) = 0, 1.059704409*diff(theta(eta), eta$2) + 6.176017503*f(eta)*diff(theta(eta), eta) + 21.03607964*diff(f(eta), eta$2) + 0.5*phi(eta) = 0, diff(f(eta), eta$4) - 1.052256547*diff(f(eta), eta)*diff(f(eta), eta$2) + 1.052256547*f(eta)*diff(f(eta), eta$3) + 5.165076420*diff(theta(eta), eta) + 5.261282735*diff(phi(eta), eta) = 0, eval(diff(phi(eta), eta), {eta = 0}) = 1 + 0.5*eval(diff(f(eta), eta$2), {eta = 0}), eval(diff(phi(eta), eta), {eta = 1}) = 0.5*eval(diff(f(eta), eta$2), {eta = 1}), f(0) = -0.5, f(1) = 0.5, phi(0) = 1, phi(1) = 0, theta(0) = 1, theta(1) = 0};

dsol:=dsolve(sys,numeric);
Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system
plots[odeplot]((dsol),eta=0..1);
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

Thank you.

To Maple support,

Why when removing symbol a from these equations makes Maple warning go away? This is from a textbook. Attached worksheet. 

 

restart;
ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*a*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

restart;
ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

worksheet attached also

interface(version)

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1230 and is the same as the version installed in this computer, created 2022, April 21, 9:8 hours Pacific Time.`

restart;

ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*a*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

{(diff(x__1(t), t))*sin(x__2(t)) = x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)), diff(x__3(t), t)+(diff(x__1(t), t))*cos(x__2(t)) = 1, diff(x__4(t), t)-(1-B)*a*x__5(t) = sin(x__2(t))*cos(x__3(t)), diff(x__5(t), t)+(1-B)*a*x__4(t) = sin(x__2(t))*sin(x__3(t)), diff(x__2(t), t) = x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t))}

Warning, it is required that the numerator of the given ODE depends on the highest derivative. Returning NULL.

restart;

ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

{(diff(x__1(t), t))*sin(x__2(t)) = x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)), diff(x__3(t), t)+(diff(x__1(t), t))*cos(x__2(t)) = 1, diff(x__4(t), t)-(1-B)*x__5(t) = sin(x__2(t))*cos(x__3(t)), diff(x__5(t), t)+(1-B)*a*x__4(t) = sin(x__2(t))*sin(x__3(t)), diff(x__2(t), t) = x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t))}

 

Download warning_may_10_2022.mw

Hi,

I want to plot a quadric with important elements ( center, Principlal directions, Principal planes..) 

NULL

Plot Quadric with center, Principal directions,Principal planes

NULL

-x^2+2*y^2+2*z^2-6*x+4*xy-4*xz-8*yz+4*z-12 = 0


Ideas ? Thanks

Download QuadricQuestion.mw

Anyone keen to spend some time helping me with an error?

I'm getting the error mentioned above with Maple 2022 (but can also be reproduced in 2021).

Originally the error comes from within a company library, but I've managed to reproduce it without the library by merging the library in the workbook.

The error arises during a simple addition / subtraction operation, and I have no clue why.

P.S.: I've also filed a request to Maple support on this one.

CrashTest.zip

Let say, 

A= A1+A2+.....................+An

B=B1+B2+.....................+Bn,

C=C1+C2+.....................+Cn

And all the values of A1 to Cn may be both positive or Negative.

Then, how to program to find the Maximum Value of  (A^2+B^2+C^2+A.B+B.C+C.A)^(1/2).

The long form of ScientificConstants[GetValue] is not working in at least Maple 2021 and Maple 2022

ScientificConstants[GetValue](Constant(g))

 

This is causing issues for MapleFlow, not being able to call on a constant. 

**edit some of the long forms work - specifically the GetValue does not.  I modified the title to reflect that.**

i have this sequence :f:=n->n/n+1
       

> f1:=seq(f(n), n = 0 .. 10);
                       f1:= 0,1/2,3/4,4/5,5/6,6/7,7/8,8/9,10/11

i want to create these sequences by using f :

1) 0,2/3,4/5,6/7,8/9,...

2)2/3,9/10,16/17,..

3) 1/2^2,3^2/4^2,5^2/6^2,7^2/8^2

4)0,3/4,8/9,24/25,35/36
        can anyone help me ?              

Suppose 

$P(x,y)=\sum_{i+j=0}^N \alpha_{i}x^{i}y^{j}$

is a multivariable polynomial of Nth degree. How may I express the first and second derivatives of $P(x,y)$ through Maplesoft?

Hello Everyone;

Hope you are fine. Solve comand is solving Equation saperately but samultanously. Kindly guide me about this. I have uploaded and pasted the code as well. The last comand (in red color) is not working. I am waiting for the kind response.

Thanks

QuestionNo1.mw

 

 

 

with(GroupTheory);
G := GaloisGroup(x^5 + 20*x + 32, x);

I just can get a result like:

GroupTheory:-GaloisGroup(x^5 + 20*x + 32, x)

But how do I know exactly what group it is? Actually I know the galois group is D5, But can we use maple to get this information?

Hi! I'm having doubts about the "automatic spacing" in maple. I would like to know two things:

1-can incorrect spacing ruin my code? (Ex by typing "spacebar" too many times )

2- i know that to type spacebar is obligatory after: proc()" "...end proc;    Is there any other situation in wich to use spacebar isn't optional? Thanks for your answers

In the positive range Maple confirms that this is true.
In the real range Maple fails to provide an answer (see attachments).

Is this identity correct?

restart

kernelopts(version)

`Maple 2022.0, X86 64 WINDOWS, Mar 8 2022, Build ID 1599809`

(1)

NULL

is(arctan(-x) = -arctan(x))

true

(2)

`assuming`([is(arctan(x, y) = -arctan(-x, y))], [x::real, y::real])

FAIL

(3)

`assuming`([is(arctan(x, y) = -arctan(-x, y))], [x::positive, y::positive])

true

(4)

`assuming`([simplify(arctan(-x, y)+arctan(x, y), trig)], [x::real, y::real])

arctan(-x, y)+arctan(x, y)

(5)

But

plot3d([arctan(-x, y)+arctan(x, y)], x = -1000000 .. 1000000, y = -1000000 .. 1000000, title = arctan(-x, y)+arctan(x, y))

 

On a unit circle

x = cos(alpha), y = sin(alpha)

x = cos(alpha), y = sin(alpha)

(6)

subs(x = cos(alpha), y = sin(alpha), arctan(-x, y)+arctan(x, y))

arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha))

(7)

`assuming`([simplify(%)], [alpha::real])

arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha))

(8)

`assuming`([simplify(%)], [alpha::positive])

arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha))

(9)

`assuming`([simplify(%)], [-Pi < alpha and alpha < Pi])

arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha))

(10)

plot(arctan(-cos(alpha), sin(alpha))+arctan(cos(alpha), sin(alpha)), alpha = -2*Pi .. 2*Pi, axes = boxed, color = red)

 

NULL


Download arctan_xy_simplify.mw

and another maybe related case where simplification does not work

arctan_xy_simplify_2.mw

3 4 5 6 7 8 9 Last Page 5 of 1913