MaplePrimes Questions

I  had to deal with a long number x =  521...773 that i wanted to break up into 3 digit segments. I converted x to a string and got y="521...773". Then I used String Tools to LengthSplit y and got a sequence z="521", ..."773". So far so good. Next I tried to extract the 3 digit segments and tried
convert(z[1],integer) but that led to

Error, (in anonymous procedure called from depends) too many levels of recursion

Very mysterious. The command convert("521",name)  gave me the symbol 521, not the number.
I eventually stumbled across parse("521") and that gave me what I wanted,namely the integer 521. I looked at the Help page for parse but decided I did not want to delve into that bit of arcane knowledge.

I also tried several times to write little procedures to strip off the double quotes but was unsuccessful.

I am sure there is a more obvious way to go about this. Any suggestions?

Hello,

I just want to put the integration constands to zero manually, but it does not seem to work. How can I do this?

Thank you in advance!

I have been unsuccessfully switching off the autosaving from Maple 2021. There is no "Options Dialog - General Tab". Please help me. Thank you!

int( exp(-2*r)*cos(theta)^3*r^2*sin(theta), phi=0..2*Pi, theta=0..Pi, r=0..infinity);
                      undefined

This integral with cos(theta) to an odd power should evaluate to zero, as found in Maple 17 [moderator: and up to Maple 2015.2] but not the most recent versions.

Hi there! 

Do you know when the new version of Maple will be released? 

Do you think it might come with a "Dark Theme"? 

Regards

Kevin

Hi,

How we can find the degree of the equation in which its powers are parametric?

For example, let

H := x^k+x^(2*k);

where k is a positive number.

Now, the degree must be 2*k, but when I use "frontend" I receive "one" !!!!

See:

assume(k>0);

frontend(degree,[H,x^k],[{`+`, `*`,`^`}]);

1

Thanks in advance.

Opgave 1)
restart;
with(LinearAlgebra);
with(plots);

a = radius 1
b = radius 2
h = højde
Error, unexpected number
a := 213/2;
b := 144/2;
h := 46;
Vi definerer A_g(a,b)= areal af grundfladne, hvor a og b er de to radiusser.
r(u,v) = parametrisering af fladen i rummet
jf = Jacobi for fladen
r(u,v,w) = parametrisering af voluminet i rummet
jv = jacobi for voluminet
v(u0,u1,v0,v1,w0,w1) = voluminet af figuren
A_f(u0,u1,v0,v1) = voluminet af fladen
Error, missing operator or `;`
A_g := (a, b) -> b*a*Pi;
V := (a, b, h) -> 2/3*b*a*Pi*h;
x := (u, v) -> a^cos(u)*sin(v);
y := (u, v) -> b*sin(u)*sin(v);
z := (u, v) -> h*cos(v);
r := (u, v) -> <x(u, v), y(u, v), z(u, v)>;
ru := (u, v) -> diff(r(u, v), u);
rv := (u, v) -> diff(r(u, v), v);
jac := CrossProduct(ru(u, v), rv(u, v));
jf := sqrt(jac[1]^2 + jac[2]^2 + jac[3]^2);
           /                        
           |                        
           |               2       4
     jf := |10969344 cos(u)  sin(v) 
           \                        

                            2                             
               /     cos(u)\                 2           /
               |/213\      |        2   /213\        4   |
        + 2116 ||---|      |  sin(u)  ln|---|  sin(v)  + |
               \\ 2 /      /            \ 2 /            \
              cos(u)                              
         /213\             2   /213\              
     -72 |---|       sin(u)  ln|---| sin(v) cos(v)
         \ 2 /                 \ 2 /              

                                                \      
                                cos(u)       \  |      
                           /213\             |  |      
        - 72 cos(u) sin(v) |---|       cos(v)|^2|^(1/2)
                           \ 2 /             /  /      

      /                                                   
      |               2       4                  2       4
jf := \10969344 cos(u)  sin(v)  + 24000201 sin(u)  sin(v) 

                                                               2\ 
     /            2                            2              \ | 
   + \-7668 sin(u)  sin(v) cos(v) - 7668 cos(u)  sin(v) cos(v)/ /^

  (1/2)


Opgave b)

A_g(a, b);
                            7668 Pi

evalf(7668*Pi);
                          24089.73247

V(a, b, h);
                           235152 Pi

evalf(235152*Pi);
                                      5
                        7.387517958 10 


Opgave b)

Vi skal blot løse integralet for
u \in [0,2*Pi] og v \in [0,Pi/2].

V bestemmer hvor langt z skal gå. Da dette er vores højde, lader vi denne gå til 0. Men ikke længere.
Error, missing operator or `;`
NULL;
int(jf, [u = -Pi .. Pi, v = 0 .. Pi/2]);
                             "(->)"

                             34384.


Opgave c)

Humlen er her, blot at definere en f(x,y,z)=z0-hældning*z, hvor:

hældning = df/dz
z0 = f(z=0)

I opgaven får vi
z=0 -> f = 20
z=46 -> f=10

Det er en fastprocentdel, så vi skal bruge eksponentialfunktion:

Hældning := (10/20)^(1/46)

Vi går så m(u,v) = f(x(u,v),y(u,v),z(u,v))

Bagefter, skal vi gange med jacobi og tage integralet.

Error, missing operator or `;`

z0 := 20;
`hældning` := (10/20)^(1/46);
f := (x, y, z) -> 20*`hældning`^z;
m := (u, v) -> 20*(1/2*2^(45/46))^(46*cos(v));

NULL;
int(m(u, v)*jf, [u = 0 .. 2*Pi, v = 0 .. Pi/2]);
                             "(->)"


                           129.98 jf

NULL;
Question:
Whenever I run any of the double integrals in this script, Maple freezes out and doesn't come back. What am I doing wrong? Why does it lag so much?

Hi,

I'd like to pass a matrix/row as an argument to a function (as in the example below) but I cannot find any documentation on it. Is it possible? If so, how could it be done?

a:=Array(1,5,frandom(0..20))

b:=sin(a)

thanks very much in advance.

best regards.

I need 4400 N of friction and not 2200N, so in wich direction operate it?Whit 2200N i I have mauch oscillation.fall_elevator_on_spring.msimfall_elevator_on_spring.msimthanks

Hi professors,

Please can someone help me 
i want code of  function in maple to calculate values  of B(t), 

i have this matlab code

randn('state',100)          
T = 1; N = 5; dt = T/N;

dW = sqrt(dt)*randn(1,N);   
W = cumsum(dW)

but does not calculate B(0.25) and B(0.5)

Thanks,

I want to generate several graphs  at the same time that can be dynamically adjusted.I tried to write the following code. But it seemed to keep overwriting the previous drawing of graphs in the list g. I only got the last graph K6.

with(GraphTheory):
g:=[seq(CompleteGraph(i),i=2..6)]:
DrawGraph~(g, layout = interactive, layoutoptions = [neutral_color = "pink", initial = spring])

I don't know how to generate  some graphs with dynamically modified layouts at once

Maple uses \begin{array}...\end{array} for the latex of a Matrix, which is all good. But for an empty matrix, it does not generate the column specification c or and so the latex when compiled gives an error. Here is an example

W:=Matrix([[]]);
latex(W)

#which gives

\left[\begin{array}{}
{}
\end{array}\right]

Compare to 

W:=Matrix([[1]]);
latex(W)

#gives

\left[\begin{array}{c}
1 
\end{array}\right]

Because the c is missing in the first example, this generates an error

\documentclass[12pt]{book}
\usepackage{amsmath}

\begin{document}   
\[
\left[\begin{array}{}
{}
\end{array}\right]
\]

\end{document}
>lualatex foo.tex
This is LuaHBTeX, Version 1.13.2 (TeX Live 2021)
 restricted system commands enabled.
(./foo.tex
LaTeX2e <2021-11-15>
 L3 programming layer <2021-11-12>
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/book.cls
Document Class: book 2021/10/04 v1.4n Standard LaTeX document class
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/bk12.clo))
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)
(./foo.aux) (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd)
! Missing # inserted in alignment preamble.
<to be read again>
\cr
l.6 \left[\begin{array}{}

?

Adding the `c` fixes the Latex.

This came up with my code generated an empty  matrix from some computation.

May be this could be corrected for future version of Maple?

Thank you.

Maple 2021.2 on windows 10.  

Dear all

I have a continuous piecewise function, but I can't evaluate its integral 

Integral.mw

thank you for your help

Hi

Say I have 3 players on 2 teams. The teams play each other and there are 9 single [[A[s], B[s]], [A[s], B[m]], [A[s], B[w]], [A[m], B[s]], [A[m], B[m]], [A[m], B[w]], [A[w], B[s]], [A[w], B[m]], [A[w], B[w]]]matchups.

A, B, C & X, Y, Z. are the players. A and X are the strongest players, C and Z are the weakest.

Here's one: [[A,X],[B,Y],[C,Z],[A,Y],[B,Z],[C,X],[A,Z],[B,X],[C,Y]]

So i'm looking for some code to display all such permutations.

Carl came up with some code a while back which 'kind of' does it

P:= [A,B]:  S:= [s,m,w]:
[seq(rtable((1..nops(S)) $ nops(P), ()-> index~(P, S[[args]]), order= C_order))];
[[A[s], B[s]], [A[s], B[m]], [A[s], B[w]], [A[m], B[s]], [A[m], B[m]], [A[m], B[w]], [A[w], B[s]], [A[w], B[m]], [A[w], B[w]]]

This is perhaps a stupid question, when I use the ScientificConstant package and call a constant e.g. R this works smoothly. But when I assign the value to a variable to use it in a calculation Maple complains about the units. However, if I assign the constant manually (without using GetConstant) Maple has no issues in solving. Is there a trick to use such a constant in a calculation? I have attached a worksheet to illustrate my question better. Thank you in advance for helping me out.GetConstantQuestion.mw

First 211 212 213 214 215 216 217 Last Page 213 of 2308