Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear all

I run a code But I obtained the following error 

 

Error, (in PW) cannot determine if this expression is true or false: (1/4)*10^(1/2) < 0.1000000000e-3


and  how can I display all iterations obtained from  PW and WDEF2 in a table.

 

PWW.mw

Thank you for any help 

 

Ennep := <u - u^3/3 + u*v^2, v - v^3/3 + v*u^2, u^2 - v^2>

plot3d(Ennep, u = -2 .. 2, v = -2 .. 2, shading = zhue, lightmodel = light1, orientation = [89, 54])

 

Do you know how I can make contours for this plot? Thanks in advance

Dear all

I need to plot the solution obtained from dsolve for a system of differential equation 

 

 

plot_analytical_solution_system.mw

Thank you for any help 

Using latest TeXLive distribution, and current Maple 2021 maple.sty file, Maple generated Latex uses command called 

             \pdfstringdefDisableCommands

which is unknown. I found this when I was trying to compile latex generated from Student:-Calculus1:-ShowSolution command.

The above latex command is called/used in maple.sty file, but it is not defined anywhere outside. It might have been defined many years ago?  I only see one reference to it in an old posting at tex stackexchange from few years ago.

This is how to reproduce this error (one needs to have latex installed on your PC to compile the file). On windows MikTeX can be used. On Linux, TeXLive.

restart;
the_output:=Student:-Calculus1:-ShowSolution(Int(x^3,x=0..1));
latex(the_output)

Then copied the latex, and pasted it in my latex file

\documentclass{article}
\usepackage{amsmath}
\usepackage{array}
\usepackage{maple}% set the path to reach this in Maple etc/ folder in its installation
\begin{document}

\[
\begin{array}{ccc}
 & {} & \textrm{Integration Steps} 
\\
 {} & {} & \int_{0}^{1}x^{3}d x  
\\
 \textrm{▫} & {} & \textrm{1. Apply the}\textrm{power}\textrm{rule to the term}\int x^{3}d x  
\\
 {} & \textrm{◦} & \textrm{Recall the definition of the}\textrm{power}\textrm{rule, for n}\textrm{≠}\textrm{-1} 
\\
 {} & {} & \int x^{n}d x =\frac{x^{n +1}}{n +1} 
\\
 {} & \textrm{◦} & \textrm{This means:} 
\\
 {} & {} & \int x^{3}d x =\frac{x^{3+1}}{3+1} 
\\
 {} & \textrm{◦} & \textrm{So,} 
\\
 {} & {} & \int x^{3}d x =\frac{x^{4}}{4} 
\\
 {} & \textrm{◦} & \textrm{Apply limits of definite integral} 
\\
 {} & {} & \frac{x^{4}}{4}{\raisebox{-0.36em}{$\Big |$}}{\mstack{}{_{x \hiderel{=}1}}}-\left(\frac{x^{4}}{4}{\raisebox{-0.36em}{$\Big |$}}{\mstack{}{_{x \hiderel{=}0}}}\right) 
\\
  & {} & \textrm{We can rewrite the integral as:} 
\\
 {} & {} & \frac{1}{4} 
\end{array}
\]

\end{document}

And now when compiling the above using the latex compiler, it gives this error

(base) >pdflatex foo5.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./foo5.tex
LaTeX2e <2020-10-01> patch level 2
L3 programming layer <2020-12-07> xparse <2020-03-03> (/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo)) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2020/texmf-dist/tex/latex/tools/array.sty) (/mnt/g/public_html/styles/maple.sty
Package: maple 2005/03/17 v1.16
Defining Maple Utility Macros
Defining Maple Plot Environemnts
 ...Defaults to "dvips" Driver
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/epsfig.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-def/dvips.def))))
Defining Automatic Style Generation Macros
Defining Maple Spreadsheet Environments
Maple Spreadsheet and Table Support
! Undefined control sequence.
l.3248 \pdfstringdefDisableCommands
                                   {\let\(\fakemath}    % 2.
?

The above command is on line 3248 in maple.sty file

 

I tried to workaround it, but do far could not find a way.

Is there a way to fix this problem in Maple 2021 latex?

Is there any predefined command in Maple that you can run it on a Maple code file such as an mpl file, or just on a piece of code written in the worksheet file and it edits the code by the easy usual styling preferences such as what pylint does in Python? Adding spaces arround ":=" or adding indentation etc.

to make this image I have just defined

f := (x, y) -> piecewise(y <> 0, 2*arctan((sqrt(y^2 + x^2) - x)/y), 0 < x and y = 0, 0, x < 0 and y = 0, Pi, x = 0 and y = 0, undefinied)

contourplot(f(x, y), x = -1 .. 1, y = -Pi .. Pi, color = black, numpoints = 10000);

ofc I could define z:=x+I*y and take


contourplot(argument(z), x = -1 .. 1, y = -Pi .. Pi, color = black, numpoints = 10000);

 

but I don't know how to delete this "tail" , I want to show only the ray (I thought that definition of argument in MAPLE is problematic so I redefined it but it doesn't matter)

I need this to create phase portrait and make better visualisation for complex function in MAPLE, so I would like to make and argument of function as two variable function which is modified such that this "tail" disappeared, thanks in advance

I want to find all roots of an function.we think there maybe 35 roots, but the commands


1. "SolveEquations" gives us 26 roots,

2."fsolve" gives us 10 roots,

3."Student[Calculus1]:-Roots" gives us 29 roots,

4.the proc "findroots" written by @acer 6 to 10 roots.

 I have tried everything but i cannot find all roots, what is th problem?
can anyone help?how many roots are there? and how to find all of them?

problem.mw

EDIT: the uploaded file is edited.

Hi.

I experience "broken links" in Maple. That is when I've used the the search field Alt+S or visited the help pages, very often thereafter I have to restart Maple in order to use e.g. the Help again, a task or whatever is essentially a link. Is this a known problem in Maple and if what do I do remedy it.
Thanks in advance.

BAC  and angle OAC

Hi!

I am double checking some textbook methods involving the arc length of a parabolic function of y.  I need to calculate the x coordinate that represents half the arc length of the parabola from x=0 to x=1

I have included my work in the form of a maple worksheet.  Help on this would be appreciated.

Have a great day!Test_solve_for_x.mw

plot3d([arctan(-tan(u/4)) + ((cosh(v) - sinh(v))*sin(u))/2, -v/2 + ((cosh(v) - sinh(v))*cos(u))/2, 2*(cosh(v/2) - sinh(v/2))*sin(u/2)], u = 0 .. 6*Pi, v = -1 .. 1, grid = [80, 15], orientation = [50, 79], shading = XYZ, style = patch)

I started to draw minimal surfaces in Maple and I noticed a problem with the parameterization of the function. When I have piecwise function like this arctan(-tan(u/4)) which graph I sent below the 3dplot shows this discontinuity. If it was only 2dplot I could use discont in the code but here I don't see a good solution.

I found these two posts but I can't translate it into a problem with the given parameterization, thank you for all advise.

https://www.mapleprimes.com/questions/200617-Analog-Of--Disconttrue--In--Plot3d

https://www.mapleprimes.com/questions/151216-Maple-Plotting-Discontinuous-Functions


 

Instead of the nice output from the help, I get the following message:

with(GlobalOptimization);

          [GetLastSolution, GlobalSolve, Interactive]

GlobalSolve(x3 - y3 - x + y, {x2 + 2*y <= 6}, x = 0 .. 5, y = 0 .. 5);
Error, (in GlobalOptimization:-GlobalSolve) finite bounds must be provided for all variables

 


 

I have the following expresion:

G_{ik}=|u_{i} - u_{k}|-(u_{i}-u_{k})^2

 

Where i, k=1,2,3,4. How can I write this expresion in maple? I want to be able to write G_{1 2} and in the RHS

Hi all, 

I am trying to plot the amplitude spectrum of a square wave. I plotted the wave by using its fourier series but I want to find the 5th harmonic which should be around 0.5 however, maplesoft retruns it as 0.7 for some reason. When the stem plot is plotted even that look likes 0.5 at the 5th harmonic but the F(5) is giving wrong value. 

Please have a look at the screenshot and file attached. 

Pulse_width_8us.mw

 

(Note: Maple was not giving wrong answer, I accidently uploaded the wrong file and have edited/updated the question)

First 298 299 300 301 302 303 304 Last Page 300 of 2097