MaplePrimes Questions

The Multivariate Calculus lagrange multipliers function acts weird if I try  to compute something with infinite Extrema like sin(x)+sin(y) with the constraint being a straight line like 1-x-y=0
The output is something like
[1 + arctan((cos(1) - 1)/sin(1)) - Pi*_Z7, -arctan((cos(1) - 1)/sin(1)) + Pi*_Z7]

and trying to output a plot fails outright. 

My questions are:

1) What exactly is this z7 in the output? 

2) is there a way to get Lagrange multipliers to output concrete values for some of the infinite points, like for example, all points with -2<x<2?

3) If 2) is not possible, how could I calculate the points manually?

I tried to simplify this equation:

where Ts,Cf,Rf,Lg & L are Variables to equivelent equation in the form of:

                                                         (.....)Z3+(....)Z2+(.....)Z+(.........)      /   (.....)Z3+(....)Z2+(.....)Z+(.........)
                                                         

Hello, everyone. I encountered one question on simplification.

I don't know how to plug the conditions

x1^2+y1^2=r^2, x2^2+y2^2=r^2,x3^2+y3^2=r^2,x4^2+y4^2=r^2

and further simplify the formula

4*x1*x2^2*x3 - 4*x1*x2*x3*x4 + 4*x1*x3*y2^2 - 4*x1*x3*y2*y4 - 4*x2^2*x3^2 - 4*x2^2*y2^2 + 4*x2^2*y2*y4 + 4*x2*x3^2*x4 + 4*x2*x4*y2^2 - 4*x2*x4*y2*y4 - 4*x3^2*y2^2 + 4*x3^2*y2*y4 - 4*y2^4 + 8*y2^3*y4 - 4*y2^2*y4^2.

Thank you very much!

I would like to use a python open source package available on internet via pip install in maple on my maple code

Package name mathchem

Link of the package mathchem · PyPI

Any advice how to

When using the Statistics package to declare a variable, let's say A,  as random, this variable is associated (assigned?) to a variable of name _R or _Rn with n a non-negative integer.
Subsequently, each expression you construct that contains the name A is displayed in a form where A has been replaced by its "alias" name _Rn.
Here is an example
 

restart:
with(Statistics):
A := RandomVariable(Uniform(0, 1)):
B := RandomVariable(Uniform(0, 2)):
C := RandomVariable(Uniform(1, 2)):
F :=  (A+2*B)/C
                          _R + 2 _R0
                          -----------
                              _R1    

Is it possible,  to display F under its original form?
Is it possible to recover that _R is in fact A, that _R0 is in fact B and so on?

y := x+k;
plot([seq(y, k = 1 .. 4)]);

Can we plot for decimal values of k, i.e., for k=1.1, 1.2, 1.3? How can we give scale for k?

 

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.

First 329 330 331 332 333 334 335 Last Page 331 of 2426