Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello,

While working for an assignment I had to use a piecewise function which gives a result based on a randomly generated value. The following is a much simpler version of what I've been working on, but it gives the same error.

A random value is uniformly distributed between 0 and 100. The piecewise returns a 1 if the value is between 0 and 50 and it returns 2 if the value is between 50 and 100. As far as I understand this function should only ever give 1 or 2, never something else. However when I loop this a few times Maple regularly returns a 0, which doesn't make sense to me. I've printed the values that return a 0 but none of these should break the piecewise. Can someone please explain to me what's going wrong here and how to fix it?

My code:

restart; randir := piecewise(0 <= r1() and r1() < 50, 1, 50 <= r1() and r1() < 100, 2);
for i to 1000 do r1 := rand(0. .. 100.0); if randir = 0 then print(fail[i], r1()) end if end do;
 

I've included a failure check to see when and at what values it returns a 0, and as you can see it happens very often.

Hi there.

I noticed that in Maple 2020 default font size of document (Times New Roman 12) looking bigger than in previous versions. How can I make the view the same as in previous versions?

Thank you

The plot is not showing two lines perpendicular ?

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?

First 544 545 546 547 548 549 550 Last Page 546 of 2217