Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear all

I have the following proc I, I need a help so that the proc run without error. 

I get Error, invalid =

 

Code_eigenvalues_eigenvectors.mw

 

Thank you for any help 

Determine the sert of point  Z in complex plane isuch that  l2z-il=Im(z+1-i)

Lets say I wanna write a procedure DrawSpaceCurve3d. 

 

DrawSpaceCurve3d:=proc(fnc::algebraic, vars:name,h::integer, xvalue::range=a{integer}...b..{integer})
plots:-spacecurve([vars, h, funk(vars, h)], ':-x' = 'xvalue')
end proc; 

How I try to run this procedure, then I get the following error. 

"Error, (in Plot:-SpaceCurve) parameter range in the form name=range is missing"

So my question is it possible to get Maple to accept that I write DrawSpaceCurve3D(x^2*y, 2, xvalue=[-5..5]) 

I know the y - curve is missing, but I would like to see if I can get Maple to accept this kind of input?
 

I am trying to solve three simultaneous PDE where the first two PDEs are 1D while the third is 2D. When using pdsolve with numeric option I am getting the following error

Error, (in pdsolve/numeric/process_PDEs) PDEs can only contain dependent variables with direct dependence on the independent variables of the problem, got {Tg(t, z, 0.6985e-1)}. Can someone please help me with this.

 

restart;
T_well := 10. + 0.026*z;

PDE_in := -0.493381*diff(Ti(t, z), z) + diff(Ti(t, z), t) = 0.000176303*(-Ti(t, z) + To(t, z));
PDE_out := 0.186546*diff(To(t, z), z) + diff(To(t, z), t) = 0.0397694*(Tg(t, z, 0.06985) - To(t, z)) + 0.0000666597*(Ti(t, z) - To(t, z));
PDE_g := 0.22828*10^7/3.5*diff(Tg(t, z, r), t) = diff(Tg(t, z, r), r)/r + diff(Tg(t, z, r), r, r) + diff(Tg(t, z, r), z, z);
PDE := {PDE_g, PDE_in, PDE_out};
IC := {Tg(0, z, r) = T_well, Ti(0, z) = T_well, To(0, z) = T_well}
BC := {3.5*D[2](Tg)(t, 2000, r) = -3/40, 3.5*D[2](Tg)(t, z, 0.06985) = 0.0397694*(Tg(t, z, 0.06985) - To(t, z)), Tg(t, 0, r) = 10, Tg(t, z, 50) = 10 + 0.026*z, To(t, 0) = 10, To(t, 2000) = Ti(t, 2000)}
pdsolve(PDE, IC, BC, numeric)


 

Hello,

I am working on a project to code a conjecture in Maple and I am stuck.  It is as follows:

"Someone had a conjecture that any odd number greater than one can be written as the sum of a prime number and twice a perfect square.  (ie 3=3+2*02, 15 = 7+2*22)  I would like to know if this holds for all the numbers from 3 to 9,000 and if not, which odd numbers fail this criteria."

I have very little coding experience so I am looking to see if anyone has an idea where I can go with this.  I tried the following:

X=P+2*N where

X:=seq(3+2i, i=0..4499);

P:={seq(ithprime(i), i=1..1250)};

N:=seq(i^2, i=0..100);

Once I get this far, however, I don't know where to go.  I would like the left side of the equation to run from 0 through 4499 (giving me a value of over 9000) while the right side does the same thing.  If there are any situations where the left side and right side do not equal each other, I want it to tell me.

My apologies if this is too wordy or confusing.  Thank you.

Dear all,

I cannot quite seem to figure out what it is that I am doing wrong. In the plots that I am trying to plot, I keep getting an error "Error, bad index into Matrix". I understand what the error means (having read through the webpage that it takes me to), but I cannot figure out what my mistake is. Can someone please help me understand what I am doing wrong?

Simple_Plot.mw

In order to use a physical constant I have to load the package "ScientificConstants". For instance, if I need the speed of light, c, I have to assign c:= Constant(c). In other words just by loading ScientificConstants the constants are not automatically assigned. Is that correct?

Hi folks

I'm trying to integrate products of Bessel functions and reproduce known results in the literature. For example, the integral

Int(BesselJ(0,k*r)*BesselJ(1,q*r),r=0..infinity);

should evaluate to 1/q if q>k and 0 if q<k, but maple only gives the first solution, even when 'assuming q<k' is specified. It should give 1/2q when k=q -- which it does but only when I put k=q in the integral. For some reason, it always assumes q>k whatever I do. 

There's a lot of examples like this. Am I missing something? Is there a way to return an answer with all the (correct!) solutions?

Thanks in advance.

I am trying to solve (unsuccessfully) the title equation with MAPLE 2020.1

If someone could help me...

Here is my code, inspired by the above code :)


restart;
with(plots);
with(PDEtools);
a := 1;
b := 1;
rho := 8166;
h := 10^(-3);
Dp := 19.2615;
f := sin(7*x)*cos(4*y);
WavEq := [rho*h*diff(w(x, y, t), t $ 2)/Dp + diff(w(x, y, t), x $ 4) + 2*diff(w(x, y, t), x $ 2, y $ 2) + diff(w(x, y, t), y $ 4) = 0, u(0, y, t) = 0, u(a, y, t) = 0, u(x, 0, t) = 0, u(x, b, t) = 0, u(x, y, 0) = f];
sol := pdsolve(WavEq);

This get the following error message : "Error, (in pdsolve/sys) the input system cannot contain equations in the arbitrary parameters alone; found equation depending only on _F1(y,t): _F1(y,t)"

Hello, 

is there any possibility how to write just a part of axis label e.g. in Italic? For example if I want want a label to be "ln(h)" and i want just the "h" to be written in Italic font.

Thanks a lot.

Today I got some useful  graph datas  in the form of adjacency list like following:

1: 2 3 4 5
2: 1 5 6 7
3: 1 7 8 9
4: 1 9 10 11
5: 1 11 12 2
6: 2 12 13 7
7: 2 6 8 3
8: 3 7 13 14
9: 3 14 10 4
10: 4 9 15 16
11: 4 16 17 5
12: 5 17 18 6
13: 6 18 19 8
14: 8 19 15 9
15: 10 14 20 21
16: 10 21 22 11
17: 11 22 23 12
18: 12 23 24 13
19: 13 24 20 14
20: 15 19 25 21
21: 15 20 22 16
22: 16 21 25 17
23: 17 25 24 18
24: 18 23 25 19
25: 20 24 23 22

I originally planned to enter them in maple one by one manually,

with(GraphTheory):
G:=Graph({{1,2},{1,3},{1,4},{1,5},{2,5},{2,6},{2,7},{3,7},{3,8},{3,9},{4,9},{4,10},{4,11},{5,11},{5,12},{6,7},{6,12},{6,13},{7,8},{8, 7}, {8,13},{8,14},{9,14},{9,10},{10,15},{10,16},{11,16},{11,17},{12,17},{12,18},{13,18},{13,19},{14,19},{14,15},{15,20},{15,21},{16,21},{16,22},{17,22},{17,23},{10,9},{10,15},{10,16},{11,16},{11,17},{12,17},{12,18},{13,18},{13,19},{14,19},{14,15},{15,20},{15,20},{15,21},{16,21},{16,22},{17,22},{17,23},{18,23},{18,24},{19,20},{19,24},{20,21},{20,25},{21,22},
{22,25},{23,24},{23,25},{24,25}})

 

but I will consider a lot of graph datas, I don’t know if there is a program that can help, Thanks advance!

 

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?

First 416 417 418 419 420 421 422 Last Page 418 of 2216