Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Maple introduced "Copy as LaTeX" a few versions ago and I have used this feature exensively when it suddenly stopped working.

After som experiments I found the root cause and easy (but irritating) workaround for OSX

Problem:

"Copy as LaTeX" suddenly stops working ("Copy as MathML" still works fine)

Cause:

This problem appears if in “Display Setting”-tab in settings dialogue the “Input display” is set to “Maple Notation

In that case all attempts on “Copy as LaTeX” will be a null-function and not move anything at all into the copy buffer.

The “Copy as MathML” is not affected by this in the same way.

I have confirmed this on OSX in Maple versions 2022, 2023, and 2024

Workaround:

Adjusting “Display Setting”-tab in settings dialogue so that the “Input display” is set to “2-D Math” and “Apply Globally” makes it work again.

A bit annoying as a prefer the maple notation input and I cannot have this setting if I want the copy to latex to work.

Note:

in OSX this can also be fixed by removing the Maple preferences file and letting Maple restore it.

~/Library/Preferences/Maple/2023/Maple Preferences

Edit: Added 2024 as affected version.

Since I began to use Maple for teaching back in 2014 (now on 2023 version), the following happens to some students. 

While they are in math mode, the Maple engine suddenly stops being unable to do anything (even 2+2). Only way to solve this is to start a new document or restart Maple. I have seen this issue on both Mac and PC version. 

So my question is what causes this? 

For example, if a plot is generated and then changed with the manipulator, if !!! (execute entire worksheet) is pressed, I would like to signal Maple not to re-execute this specific command (or excecution group)--leave the plot as it is. This also would be useful if a Tutor is used and it returns a series of steps (after user i/o), it may be somehow marked so that this command line not to re-execute at a later date. Simply using the comment out symbol (#), of course, prevents re-execute but the previous result is removed.

Thank you for any info.

I am trying to draw this pictures in LaTeX, then I need to find their parametric equations. How can I get them?
 

Hi everyone,

I'd like to draw your attention to a package we recently uploaded to the Maple Cloud, here. You can download the package from the linked Cloud page, or directly from here as a workbook file: NaturalLanguage.maple. I'll include a lightly edited version of the "cover sheet" that introduces the package below. I have left the first four sections folded closed - you can see those in the linked Maple Cloud page or the workbook - because I think the last section is the most interesting.
 

Using natural language models in Maple


This package explores using large language models such as ChatGPT for processing natural language in Maple. Let's load the package from source, save it in this workbook, and load it.

restart

read "this:///lib/NaturalLanguage.mpl"

savelib('NaturalLanguage', "this://")

with(NaturalLanguage)

Warning, the NaturalLanguage package is an experimental package designed as an interface to publicly available large language models such as ChatGPT. Use of this package is entirely at the user's risk. Results may be inconsistent, misleading, or flat out incorrect. 

[Explain, GetCommand, GetMath, Query, RawQuery]

(1)

We note there is a warning: we will see output of large language models, which will often include inaccurate statements. Please keep this in mind - this is not (yet?) technology that you want to use to build a bridge!

We also note that there are five publically exposed commands. Let's look at them in turn.

RawQuery

   

Query

   

GetMath

   

GetCommand

   

Explain

 
• 

The Explain command asks the given model to explain the item in the query. After an explanation, you can ask for more detail by issuing the command Explain(more), Explain("go on"), Explain(elaborate), Explain(further), Explain("continue"), or minor variations. The item you ask about can be a mathematical expression, equation, list of equations, or a string.

• 

The default model is GPT-4; you can select the other model by using the model = ChatGPT option, or forcing use of the GPT-4 model by using the model = GPT4 option. Note that OpenAI may deprecate and disable models, so the set of models supported may change in the future.

display(Explain(x^2+y^2=1));display(Explain(x^2+y^2 = 1))

This equation represents a circle with a radius of 1 centered at the origin (0,0) on a coordinate plane.

 

display(Explain(more));display(Explain(more))

The equation x^2 + y^2 = 1 represents a circle in a two-dimensional plane (specifically, a Cartesian plane).

The center of the circle is at the origin of the coordinates (0,0) and its radius is 1. This is because any point (x, y) on the circle is a distance r (the radius) away from the center, and by the Pythagorean theorem, this distance is given by the square root of (x^2 + y^2). The fact that x^2 + y^2 = 1 implies that the radius r = sqrt(1) = 1.

This fundamental equation is also the unit circle in trigonometry, where angles are measured in radians. The coordinates (x, y) represent the cosine and sine of the angle respectively. The unit circle is a crucial concept in trigonometry, complex number theory, and calculus. It simplifies many mathematical concepts and provides a geometric interpretation of a variety of phenomena in physical sciences and engineering.

 

display(Explain(Re(exp(x*I + y*I)) = Re(exp(x*I)) * Re(exp(y*I)) - Im(exp(x*I)) * Im(exp(y*I))));display(Explain(Re(exp(I*x+I*y)) = Re(exp(I*x))*Re(exp(I*y))-Im(exp(I*x))*Im(exp(I*y))))

The equation seems to be using Euler's formula, which states that e^(ix) = cos(x) + i*sin(x). The 'Re' refers to the real part of a complex number, and 'Im' refers to the imaginary part. So, if you put Euler's formula in there your equation is equivalent to cos(x + y) = cos(x)cos(y) - sin(x)sin(y), which is basically the well-known trigonometric formula for the cosine of a sum. In a nutshell, it's dealing with the trigonometric identities and properties of exponential functions with complex numbers.

 

display(Explain("go on", model = ChatGPT));display(Explain("go on", model = ChatGPT))

The given equation appears to be dealing with the real part of a complex exponential expression. Let's break it down step by step to understand its meaning:

1. The equation involves the expression e^(i*x+i*y), where e represents Euler's number (~2.718), i is the imaginary unit (√(-1)), and x and y are real numbers.
2. The expression e^(i*x+i*y) can be rewritten using Euler's formula: e^(i*x+i*y) = cos(x+y) + i*sin(x+y). This is a complex number in the form a + bi, where 'a' represents the real part (Re) and 'b' represents the imaginary part (Im).
3. The real part of e^(i*x+i*y) is, therefore, Re(e^(i*x+i*y)) = cos(x+y).
4. The right side of the equation consists of the product of two complex exponential expressions: Re(e^(i*x))*Re(e^(i*y))-Im(e^(i*x))*Im(e^(i*y)).
5. The expression Re(e^(i*x)) represents the real part of e^(i*x), which is cos(x), and Im(e^(i*x)) represents the imaginary part of e^(i*x), which is sin(x).
6. Similarly, Re(e^(i*y)) represents the real part of e^(i*y), which is cos(y), and Im(e^(i*y)) represents the imaginary part of e^(i*y), which is sin(y).
7. Therefore, the right side becomes: (cos(x)*cos(y)) - (sin(x)*sin(y)).

So, the equation Re(e^(i*x+i*y)) = Re(e^(i*x))*Re(e^(i*y))-Im(e^(i*x))*Im(e^(i*y)) essentially states that the real part of e^(i*x+i*y) (i.e., cos(x+y)) is equal to the real part of e^(i*x) (i.e., cos(x)) multiplied by the real part of e^(i*y) (i.e., cos(y)), minus the imaginary part of e^(i*x) (i.e., sin(x)) multiplied by the imaginary part of e^(i*y) (i.e., sin(y)).

In simpler terms, the equation is connecting the real part of the sum of two complex exponential expressions with the product of the real parts and the difference of the imaginary parts of those individual expressions.

 

display(Explain(Re(sigma) < 0));display(Explain(Re(sigma) < 0))

The inequality "Re(sigma) < 0" is a statement in complex number theory. It is saying that the real part (Re) of a complex number sigma is less than zero. This means that the complex number is to the left of the imaginary axis in the complex number plane. This kind of inequality is often used in the study of complex functions, in areas such as control systems or signal processing in electrical engineering, and also in number theory and the study of dynamical systems in mathematics.

 

display(Explain(continue));display(Explain(continue))

The inequality "Re(sigma) < 0" is typically related to the field of complex numbers. Here, "Re" stands for the real part of a complex number and "sigma" is usually used to represent a complex number. So, "Re(sigma) < 0" is saying that the real part of the complex number sigma is negative.

Complex numbers are usually written in the form a + bi, where a and b are real numbers and i is the imaginary unit. The "Re" in "Re(sigma)" refers to the a part of this form, i.e. the real part of the complex number.

This inequality is often found in fields like control systems engineering or signal processing. For instance, in control systems, all the poles of a stable system must have a negative real part. Another context you might come across this inequality is in complex analysis, one might examine the region where the real part of a complex function is negative. So, the inequality "Re(sigma) < 0" expresses that a complex number is in the left half of the complex plane, which is often crucial for the stability of many systems in engineering.

 

display(Explain("The Maple command simplify"));display(Explain("The Maple command simplify"))

The Maple command "simplify" is used to simplify mathematical expressions. In Maple, this command applies various rules to reduce an equation or expression to its simplest or most compact form.

For example, if you have an equation like `(x^3 - x^2)/x^2`, using the simplify command would reduce it to `x - 1`. It simplifies algebraic expressions, performs factorization, combines like terms, cancel out common factors, etc.

The general syntax is `simplify(expr)`, where `expr` is the expression that you want to simplify. The simplified expression is returned as output.

Please note that the simplifications made by this command are based on general rules and may not always give the expected results for some specific expressions due to the complexity of mathematical simplifications.

 

display(Explain(continue, model=ChatGPT));display(Explain(continue, model = ChatGPT))

The Maple command "simplify" is used to simplify mathematical expressions. It takes an expression as input and attempts to find a simplified form by applying various algebraic rules and simplification techniques.

When you use the "simplify" command, Maple applies a series of simplification steps, which can include:

1. Expanding and factoring polynomials: This step expands products of terms and factors out common terms.
2. Simplifying fractions: The command simplifies fractions by canceling common factors in the numerator and denominator.
3. Simplifying trigonometric expressions: Maple applies trigonometric identities to simplify expressions involving trigonometric functions.
4. Simplifying logarithmic and exponential expressions: The command applies rules of logarithms and exponents to simplify expressions with these functions.
5. Simplifying square roots and radicals: It simplifies square roots by expressing them in simplest radical form.
6. Simplifying expressions involving absolute values: Maple simplifies absolute value expressions by considering different cases based on the sign of the argument.
7. Applying mathematical identities and rules: The command uses various mathematical identities and rules to simplify expressions further.

The "simplify" command in Maple is very powerful and can handle a wide range of mathematical expressions. However, it may not always produce the most simplified form, as simplification can sometimes be a subjective task. In such cases, you can try using other commands or options available in Maple to refine the simplification process.

To use the "simplify" command in Maple, you can simply type "simplify(expression)" where "expression" represents the mathematical expression you want to simplify.

 

display(Explain("Weight of a W10X54 beam?"))

The weight of a W10X54 beam refers to the weight specification of a beam in the W Beam series, commonly used in construction and engineering projects. The nomenclature "W10X54" is decoded as follows:

- W: it stands for 'wide flange', a type of structural steel beam where the flanges are parallel to each other.
- 10: it indicates the nominal depth of the wide flange, which is about 10 inches.
- 54: it indicates the weight of the beam per linear foot, which is about 54 pounds.

So, a W10X54 beam weighs 54 pounds per foot.

 

display(Explain(further))

"Weight of a W10X54 beam" refers to the weight of a specific kind of structural steel beam used in construction and architecture. The "W" stands for "wide flange", which is a particular type of I-beam.

The "10" means the nominal depth of the beam in inches (also known as its height when standing upright).

The "54" represents the beam's weight per foot in pounds. In other words, for every foot of length the beam has, it weighs 54 pounds.

 So if you have a W10X54 beam that is 10 feet long, its total weight would be 540 pounds (10 feet times 54 pounds per foot).

Please note that these are nominal dimensions and may not exactly match the true dimensions of the beam due to manufacturing variables.

 

NULL

 

What do you think? Will this be an important part of mathematical software in the near future, or are we still far away from that point? We'd love to hear your opinions.

Hi to All!

I have an equation including 6 parameters; k_1, k_2, k_3, l_1, l_2, l_3 and a constant a_1. I want to solve this equation for l_1, l_2, and l_3. I get a solution as can be seen in the link but I wonder if there is a solution such that l_j is written in terms of k_j and a_1, j=1,2,3. I mean can be put a restriction on a parameter such that it depends to specific parameters?

Thank you in advance.

Regards,

question.mw

How can I import my data from my Ms word document to a Maple work sheet. Iam finding it difficult to save my work as a Dat file. Something like this example below

 

Data:=readdata("c:/Users/kokoge00/Desktop/methods.dat",float,10);
Data := [[0.1, 0.0769540597, 0.1477783335, 0.1393069312

  0.0763361154, 0.1477867626, 0.1393072151, 0.0763361266

  0.1477867830, 0.1393071934], [0.3, 0.1093424148, 0.1120401102

  0.1509302274, 0.1072278404, 0.1121142033, 0.1509369166

  0.1072278479, 0.1121142168, 0.1509369024], [0.5, 0.1392030568

  0.0853083077, 0.1558066181, 0.1353291378, 0.0855066806

  0.1558355785, 0.1353291558, 0.08550671332, 0.1558355439], [0.7, 

  0.1662374563, 0.0652194693, 0.1562235596, 0.1604342222

  0.0655908735, 0.1562974878, 0.1604342352, 0.06559089617, 

  0.1562974637], [0.9, 0.1903821623, 0.0500537619, 0.1537887672

  0.1825594352, 0.0506356391, 0.1539346707, 0.1825594528

  0.05063567192, 0.1539346352], [1.1, 0.2117168860, 0.0385555127

  0.1496220815, 0.2018541863, 0.0393727175, 0.1498707561

  0.2018542024, 0.03937274753, 0.1498707234], [1.3, 0.2303874000

  0.0298096396, 0.1444864012, 0.2185409755, 0.0308687065

  0.1448804021, 0.2185409880, 0.03086872986, 0.1448803765], [1.5, 

  0.2465077820, 0.0231661161, 0.1388614678, 0.2328759081

  0.0244336214, 0.1394893808, 0.2328759200, 0.02443364533, 

  0.1394893543]]
 

Why does Maple 2023.x not evaluate to Phi := -b in the following example?

> restart:
> z:=-a*exp(-I*b):
> Phi:=simplify(evalc(argument(z)));
               Phi := arctan(a sin(b), -a cos(b))

Since Maple forms the main value of arctan(y, x), would have to be
Phi=arctan(a sin(b), -a cos(b))=arctan((a sin(b))/(-a cos(b)))=arctan(-tan(b))=-b.

Is the full evaluation not implemented for some reason or what did I miss?

Hi everyone, I am trying to reproduce the results using the HPM method in Maple for ODE. Later, will use these results for my original problem.  The problem has power N as an exponent; when I fixed N some to a numeric number, then I get some equation, but this equation is not similar as reported in the paper, I do not want to fix N to some numeric number.  I am attaching my Mplae worksheet and some pictures of the problem that I want to reproduce. Could anyone help me reproduce all the equations as it is reported in the paper, please have a look at my worksheet. There are 4 pictures, and their name is according to sequence .....................

HPM-Help.mw

 

I installed Maple 2023.1 update and immediately noticed a problem with the worksheet editor.

Specifically, the editor seems to be replacing "<" with "!" in the maple code. I first noticed the problem with code copied from the maple code editor into a worksheet, but then noticed the same problem with code on another worksheet which was loaded from file. Thus, it seems the problem is actually in the worksheet editor and not the copy paste function.  Note that the problem occurred immediately on reloading files after I restarted maple from the update. Normally, when this occurs, it starts after Maple has been loaded for an hour or more. Fortunately, when I restarted Maple and reloaded files, the problem seems to have cleared itself.

I have attached images showing the maple screen with the error, and also the specific code copied from the code editor to a worksheet for comparison.  I have also attached the worksheets in which I saw the problem. For now my goto workaround is to save and restart because the problem does not seem to corrupt the actual files even when I save them.

 

Attachments: chain.mw  chain2.mw

Mathematica has a benchmarking package that allows you to evaluate your computer's performance with respect to other computers with different specs.
I was wondering if there was a similar script/package for maple?

Hi dear users!

I hope everyone is fine here. I want to compute the NULL SPACE vector V2[1], V2[2], V2[3],... of matrices MatrixEquationAgain2[1], MatrixEquationAgain2[2], MatrixEquationAgain2[3]... for different values of M. Kindly see my attached file where I struggled a lot but failed to evaluate it. Kindly help me to compute it. Thanks in advance

NULL_SPACE.mw

According to print - Maple Help (maplesoft.com),

calling print[N] instead of print where N is an integer between -2 and +3, temporarily overrides the prettyprint interface variable.

However, I find that 

print[-2]();
Error, prettyprint must be an integer in the range 0..3
print[-1]();
Error, prettyprint must be an integer in the range 0..3

Also, 

interface(prettyprint = -2);
Error, (in interface) prettyprint must be an integer in the range 0..3
interface(prettyprint = -1);
Error, (in interface) prettyprint must be an integer in the range 0..3

Did I miss something?

Dear experts

I am interested in solving the following differential equation numerically

diff(eta(k,t),t,t) + gamma*diff(eta(k,t),t) + omega^2*eta(k,t) + (3/4)*k*omega*eta(k,t)*eta(k,t) + (3/2)*k*eta(k,t)*(omega*eta(k,t) + (3/4)*k*eta(k,t)*eta(k,t)) + (omega*gamma*eta(k,t) + (3/2)*k*eta(k,t)*(gamma*eta(k,t)))*(diff(eta(k,t),t) + gamma*eta(k,t))/(omega*eta(k,t) + (3/4)*k*eta(k,t)*eta(k,t)) = 0;

where eta(x,t) is the Fourier transform of zeta(x,t) and plot of zeta(x,t) is the goal. I think FFT method can help but I failed in running and applying this method on the equation above.
Initial conditions are

f= 0.28
C = 1/L*0.2/f*tanh(L/f)
L=20
amp = 0.5e-2
zeta0 = amp/cosh(f*x)/cosh(f*x)-C

and u0 as initial velocity can be 0 or an arbitrary function such as 
u0 =2*amp/cosh(f*x)/cosh(f*x)*f*tanh(f*x)

I would appreciate it if one could help me.

How do I add the solve command to the end?

Download Zakobi.mw

First 62 63 64 65 66 67 68 Last Page 64 of 2097