Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Can anyone help with ploting the movement of the body along the segment AB, BC this task?

restart;
alpha:=Pi/6: V[A]:=1: l:=3: f:=0.2: d:=2.5:
# The movement of the body along the segment AB
de:=m*diff(x1(t),t,t)=G*sin(alpha)-F[fr]:
G:=m*g: F[fr]:=m*g*f*cos(alpha): g:=9.81:
ics:=x1(0)=0, D(x1)(0)=V[A]:
de:=evalf(de/m);
B:=rhs(de);
sol:=dsolve({de,ics}, x1(t)); # The solution of de
fsolve(rhs(sol)=l);
tau:=evalf[3](%[2]);
V['B']:=B*tau+V[A];
 

diff(diff(x1(t), t), t) = 3.205858157

 

3.205858157

 

x1(t) = (3205858157/2000000000)*t^2+t

 

-1.715094465, 1.091236545

 

1.09

 

4.494385391

(1)

# The movement of the body along the curve BC
sys:=m*diff(x(t),t,t)=0, m*diff(y(t),t,t)=m*g;
ics_sys:=x(0)=0, y(0)=0, D(x)(0)=V['B']*cos(alpha), D(y)(0)=V['B']*sin(alpha):
Sol:=evalf(dsolve({sys, ics_sys})); # The solution of sys
T:=evalf(solve(eval(x(t),Sol)=d));
h:=evalf(eval(eval(y(t),Sol),t=T));
T:=evalf[2](T);
h:=evalf[3](h);   
 

m*(diff(diff(x(t), t), t)) = 0, m*(diff(diff(y(t), t), t)) = 9.81*m

 

{x(t) = 3.892251925*t, y(t) = 4.905000000*t^2+2.247192696*t}

 

.6423016927

 

3.466940605

 

.64

 

3.47

(2)

 


 

Download sol_Maple.mw

Hi there.

How supress this warning in Maple 2020 when I use "e" just like a variable not an exponent:

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

?

Thank you

Dears,
Someone to know install modules as pyautogui? 
ImportModule("pyautogui")
In my software gives the following message "Error, (in Python:-ImportModule) ModuleNotFoundError: No module named 'pyautogui' ['Traceback (most recent call last):\n', '  File "<string>", line 1, in <module>\n', "ModuleNotFoundError: No module named 'pyautogui'\n"]"
Or someone know about automation keyboard in Maplesoft?
Kind regards

 Dear Maple community, 
I am struggling with the numerical solution of the complex (linear) partial differential equation to obtain results. For example, I see such as this statement "Error, (in pdsolve/numeric/plot) unable to compute solution for t<HFloat(0.0): signum is not differentiable at complex values" pops up. I did my homework but I didn't get anything. I will be happy if someone could give me some suggestions or advice. Thank you in advance. 

Hi, need help with ploting task. Could someone help with this?

Task:

The svg generated by Export, for example, 

svg_code := Export(plot(x), target = direct, format = "svg");

is broken (the svg generated is invalid). 

Is there a fix for this issue?

If there is no fix, is there a way to output (to be assigned to a variable) a text (ascii) containing base64 encorded png of a plot.

Hello, so my maple won't solve any function involving either cos, tan or sin. Has anyone experienced this before or know how to fix it? 

For example i need to find: cos(30), but it comes up as cos(30) after I hit enter. 

 

Many thanks to anyone who tries to help! :)

Hi, I have a problem with solution task. Why eq2 doesn't accept value of x1?


restart;
P := 12; M := 6; q := 2; BC := 2; Q := q*BC; CN := (1/2)*BC; NB := CN; AK := 1; KC := AK*evalf(cot((1/6)*Pi)); KN := KC+CN; BK := NB+KN;
                            P := 12
                             M := 6
                             q := 2
                            BC := 2
                             Q := 4
                            CN := 1
                            NB := 1
                            AK := 1
                       KC := 1.732050808
                       KN := 2.732050808
                       BK := 3.732050808

eq1 := x1 = (P*evalf(cos((1/6)*Pi))-Q*sin((1/6)*Pi))/sin((1/6)*Pi);
                    eq1 := x1 = 16.78460970

eq2 := x2 = AK*P+BK*x1+KN*Q+M;
            eq2 := x2 = 3.732050808 x1 + 28.92820323

solve({eq1, eq2}, {x1, x2});
              {x1 = 16.78460970, x2 = 91.56921942}
NULL;
B := vector(2, [(P*evalf(cos((1/6)*Pi))-Q*sin((1/6)*Pi))/sin((1/6)*Pi), AK*P+BK*x1+KN*Q+M]);
        B := [16.78460970, 3.732050808 x1 + 28.92820323]

A := matrix(2, 2, [[1, 0], [0, 1]]);
                               [1  0]
                          A := [    ]
                               [0  1]

C := evalm(1/A);
                               [1  0]
                          C := [    ]
                               [0  1]

x := evalm(`&*`(C, B));
        x := [16.78460970, 3.732050808 x1 + 28.92820323]

 

Hello everyone. does anyone please correct my worksheet? I
 

restart

E := 1/e^5

S := 1/e^5

f := proc (x) options operator, arrow; x^2-2 end proc

proc (x) options operator, arrow; x^2-2 end proc

(1)

a := 1

1

(2)

b := 2

2

(3)

"while b-a>=S or (abs(f(a))>=E and abs(abs(f(b))>=E)                                                                                       "

Error, unable to match delimiters

"while b-a>=S or (abs(f(a))>=E and abs(abs(f(b))>=E)"

 

"do"

Error, unable to parse

"do"

 

"if (f(x[a])-f(x[b])=0)"

Error, invalid 'if' statement

"if (f(x[a])-f(x[b])=0)"

 

print(Method*fail)

Method*fail

(4)

break

Error, break or next not in loop

 

"fi;"

Error, unable to parse

"fi;"

 

c := b-f(b)*(b-a)/(f(b)-f(a))

4/3

(5)

"if f(c)<E then"

Error, unterminated 'if' statement

"if f(c)<E then"

 

break

Error, break or next not in loop

 

"elif f(a) f(c)<0 then"

Error, unable to parse

"elif f(a) f(c)<0 then"

 

b := c

4/3

(6)

"else"

Error, unable to parse

"else"

 

a := c

4/3

(7)

"end if;"

Error, unable to parse

"end if;"

 

"end do;"

Error, unable to parse

"end do;"

 

[a, b]

[4/3, 4/3]

(8)

abs(f(a))

2/9

(9)

abs(f(b))

2/9

(10)

``


 

Download Method.mw

am trying to solve but could not get the required answer

how I can I get MAPLe to simplify this to Pi/2-beta ,

simplify(arctan(sin(beta)/cos(beta)),arctrig) assuming beta<Pi/2,beta>0;

simplify(arctan(sin(beta)/cos(beta)),symbolic) assuming beta<Pi/2,beta>0;

why i can't get Pi/2-beta

https://www.mapleprimes.com/questions/219048-Help-File-Edit-After-Storing-In-A-Database

I found a previous post which contained a worksheet script for creating help, but this example is likely out-of-date. Can anyone provide a similar example for post-2018 help files to save me considerable trial and error.

I want to open an external *.XML file and put this information in a list (every part is a row). Later, i will change a specific row with other text. Finally, I want to copy all this changes in the same file (rewrite the file).
Someone to help me?

> den := -(-(conjugate(chi)-conjugate(phi))*(chi+phi)*conjugate(lambda)+lambda*(conjugate(chi)+conjugate(phi))*(chi-phi))*(-(conjugate(chi)+conjugate(phi))*(chi-phi)*conjugate(lambda)+lambda*(conjugate(chi)-conjugate(phi))*(chi+phi));

> phi:=exp(I*lambda*(x-t/(4*lambda^2)-w^2)):chi:=exp(-I*lambda*(x-t/(4*lambda^2)-w^2)):

> den1:=simplify(dsubs({phi,chi},den));

> dsubs({exp((1/4*I)*(4*lambda^2*w^2-4*lambda^2*x+t)/lambda), exp(-(1/4*I)*(4*lambda^2*w^2-4*lambda^2*x+t)/lambda)}, 4*conjugate(lambda)^2*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2-4*conjugate(lambda)^2*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2+8*abs(lambda)^2*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2+8*abs(lambda)^2*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2+4*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2*lambda^2-4*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2*lambda^2-16*abs(lambda)^2)

 

Since "cos(...)" appears in every term in last equation (except a last one), how to common it? 

The  galois routine returns the group of  polynomials within quotation marks, e.g.  "6T1".

How to convert  things like  "6T1"  into just   6T1, i.e. how to get rid of the quotation symbols?

Here is a little cute demo that shows how a cube may be paritioned into three congruent pyramids.  This was inspired by a Mathematica demo that I found in the web but I think this one's better :-)

A Cube as a union of three right pyramids

Here is an animated demo of the well-known fact that a cube may be partitioned

into three congruent right pyramids.

 

2020-05-21

restart;

with(plots):

with(plottools):

A proc to plot a general polyhedron.
V = [[x, y, z], [x, y, z], () .. (), [x, y, z]]                list of vertices
F = [[n__1, n__2, () .. ()], [n__1, n__2, () .. ()], () .. (), [n__1, n__2, () .. ()]]  list of faces

An entry "[`n__1`,`n__2`. ...]" in Fdescribes a face made of the vertices "V[`n__1`], V[`n__2`], ...," etc.

polyhedron := proc(V::list, F::list)
  seq(plottools:-polygon([seq( V[F[i][j]], j=1..nops(F[i]))]), i=1..nops(F));
  plots:-display(%);
end proc:

Define the vertices and faces of a pyramid:

v := [[0,0,0],[1,0,0],[1,1,0],[0,1,0],[0,0,1]];
f := [ [1,2,3,4], [5,2,3], [5,3,4], [1,5,4], [1,2,5] ];

[[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0], [0, 0, 1]]

[[1, 2, 3, 4], [5, 2, 3], [5, 3, 4], [1, 5, 4], [1, 2, 5]]

Build three such pyramids:

P1 := polyhedron(v, f):
P2 := reflect(P1, [[1,0,0],[1,1,0],[1,0,1]]):
P3 := reflect(P1, [[0,1,0],[1,1,0],[0,1,1]]):

This is what we have so far:

display(P1,P2,P3, scaling=constrained);

Define an animation frame.  The parameter t goes from 0 to 1.

Any extra options are assumed to be plot3d options and are

passed to plots:-display.

frame := proc(t)
  plots:-display(
    P1,

    rotate(P2, Pi/2*t, [[1,1,0],[1,0,0]]),
    rotate(P3, Pi/2*t, [[0,1,0],[1,1,0]]),
    color=["Red", "Green", "Blue"], _rest);
end proc:

Animate:

display(frame(0) $40, seq(frame(t), t=0..1, 0.01), frame(1) $40,
  insequence, scaling=constrained, axes=none,
  orientation=[45,0,120], viewpoint=circleleft);

 

Download square-partitioned-into-pyramids.mw

 

 

First 424 425 426 427 428 429 430 Last Page 426 of 2097