MaplePrimes Questions

 

NULL

"#(1+c1)f^(' ' ' ')-c1*g^(' ' )-Re(f^*f^(' ' ')-f'*f^(' '))-n0*(1+c1)f^(' ' )-m0*f^(' ' )=0"

#c2"*g^(' ')+c1(f^(' ')-2 g)-c3*Re(f*g'-f'*g)=0"

NULL

NULL

#boundary condition

f=-1, f^'=0, g=0, a=1, b=1   at  η=-1    

f=1, f^'=0, g=0, a=0, b=0   at  η=-1

restart

PDEtools[declare](f(t), prime = t)

` f`(t)*`will now be displayed as`*f

 

`derivatives with respect to`*t*`of functions of one variable will now be displayed with '`

(1)

N := 15

15

(2)

"f(t):=sum((p^((i)))*f[i]t,i=0..N)"

proc (t) options operator, arrow, function_assign; sum((diff(p(x), [`$`(x, i)]))*f[i]*t, i = 0 .. N) end proc

(3)

"de1:=(1-p)*((1+c1)*diff(f(t), t $ 4) -n0*(1+c1)*diff(f(t), t $ 2)  -m0*diff(f(t), t $ 2)))+p(((1+c1)*diff(f(t), t $ 4)-c1*diff(g(t), t $ 2)-Re(f(t)*diff(f(t), t $ 3)-diff(f(t), t $ 1)*diff(f(t), t  2)) -n0 *(1+c1)*diff(f(t), t $ 2)  -m0*diff(f(t), t $ 2) )"

"de2=(1-p)*(c2 *diff(g(t), t $ 2)+c1*(diff(f(t), t $ 2)-2*g(t))))+p*(c2 *diff(g(t), t $ 2)+c1*(diff(f(t), t $ 2)-2*g(t))-c3*Re(f(t)*diff(g(t), t $ 1)-diff(f(t), t $ 1)*g(t))));"

de3 = (1-p)*(diff(a(t), `$`(t, 2))+D*(diff(b(t), `$`(t, 2))))+p*(diff(a(t), `$`(t, 2))+D*(diff(b(t), `$`(t, 2)))+Ph*(diff(f(t), `$`(t, 1)))*a(t)-ph*f(t)*(diff(a(t), `$`(t, 1))))

de4 = (1-p)*(diff(a(t), `$`(t, 2))+D*(diff(b(t), `$`(t, 2))))+p*(diff(b(t), `$`(t, 2))+S*(diff(a(t), `$`(t, 2)))+Pm*(diff(f(t), `$`(t, 1)))*b(t)-ph*f(t)*(diff(b(t), `$`(t, 1))))

sys1 := eval([de1, de2, de3, de4], p = 1)

[de1, de2, de3, de4]

(4)

dsolve(sys1)

Error, (in dsolve) required an indication of the solving variables for the given system

 

n := 4

4

(5)

f := unapply(add(g[k](t)*p^k, k = 0 .. n), t)

proc (t) options operator, arrow; g[0](t)+g[1](t)*p+g[2](t)*p^2+g[3](t)*p^3+g[4](t)*p^4 end proc

(6)

g := unapply(add(h[k](t)*p^k, k = 0 .. n), t)

proc (t) options operator, arrow; h[0](t)+h[1](t)*p+h[2](t)*p^2+h[3](t)*p^3+h[4](t)*p^4 end proc

(7)

a := unapply(add(i[k](t)*p^k, k = 0 .. n), t)

proc (t) options operator, arrow; i[0](t)+i[1](t)*p+i[2](t)*p^2+i[3](t)*p^3+i[4](t)*p^4 end proc

(8)

b := unapply(add(j[k](t)*p^k, k = 0 .. n), t)

proc (t) options operator, arrow; j[0](t)+j[1](t)*p+j[2](t)*p^2+j[3](t)*p^3+j[4](t)*p^4 end proc

(9)

NULL

cond[1][0] := f[0](-1) = -1, (D(f[0]))(-1) = 0, f[0](1) = 1, (D(f[0]))(1) = 0; g[0](-1) = 0, g[0](1) = 0, a[0](-1) = 1, a[0](1) = 1, b[0](-1) = 1, b[0](1) = 0

Error, (in anonymous procedure) invalid input: diff received -1, which is not valid for its 2nd argument

 

h[0](-1)+h[1](-1)*p+h[2](-1)*p^2+h[3](-1)*p^3+h[4](-1)*p^4 = 0, h[0](1)+h[1](1)*p+h[2](1)*p^2+h[3](1)*p^3+h[4](1)*p^4 = 0, i[0](-1)+i[1](-1)*p+i[2](-1)*p^2+i[3](-1)*p^3+i[4](-1)*p^4 = 1, i[0](1)+i[1](1)*p+i[2](1)*p^2+i[3](1)*p^3+i[4](1)*p^4 = 1, j[0](-1)+j[1](-1)*p+j[2](-1)*p^2+j[3](-1)*p^3+j[4](-1)*p^4 = 1, j[0](1)+j[1](1)*p+j[2](1)*p^2+j[3](1)*p^3+j[4](1)*p^4 = 0

(10)

m0 := 12; n0 := 10; ph := .1; pm := .1; c1 := 1.2; c2 := .8; c3 := .6; D := 0.3e-1; S := 2.0; Re := 1


 

Download Hpm_try_19.mw

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]]]

First 19 20 21 22 23 24 25 Last Page 21 of 2119