MaplePrimes Questions

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?


 

``

restart:

with(PDEtools):

with(LinearAlgebra):

 

alias(f=f(x,t),g=g(x,t));

f, g

(1)

 

 

eq1:=diff(f,x)=-I*eta*f +I*exp(-I*t)*g;

diff(f, x) = -I*eta*f+I*exp(-I*t)*g

(2)

eq2:=diff(g,x)=-I*eta*g +I*exp(I*t)*f;

diff(g, x) = -I*eta*g+I*exp(I*t)*f

(3)

eq3:=diff(f,t)=(I*eta^2-I/2)*f +I*eta*exp(-I*t)*g;

diff(f, t) = (I*eta^2-(1/2)*I)*f+I*eta*exp(-I*t)*g

(4)

eq4:=diff(g,t)=(-I*eta^2+I/2)*g +I*eta*exp(I*t)*f;

diff(g, t) = (-I*eta^2+(1/2)*I)*g+I*eta*exp(I*t)*f

(5)

#### The solution of (2)-(5) is

eq5:=f=I*(c1*exp(A)-c2*exp(-A))*exp(-i*t/2);

f = I*(exp(A)*c1-c2*exp(-A))*exp(-(1/2)*i*t)

(6)

eq6:=g=(c2*exp(A)-c1*exp(-A))*exp(i*t/2);

g = (c2*exp(A)-c1*exp(-A))*exp((1/2)*i*t)

(7)

#### where

c1=sqrt(h-sqrt(h^2-1))/sqrt(h^2-1);c2=sqrt(h+sqrt(h^2-1))/sqrt(h^2-1);A=sqrt(h^2-1)*(x+I*h*t);

c1 = (h-(h^2-1)^(1/2))^(1/2)/(h^2-1)^(1/2)

 

c2 = (h+(h^2-1)^(1/2))^(1/2)/(h^2-1)^(1/2)

 

A = (h^2-1)^(1/2)*(x+I*h*t)

(8)

#### How to verify (6) and (7) is the solution of (2)-(5)?

``


 

Download verification.mw

I'm trying to document some generator calculations that use terms line Xd'. In Maple that turns into a derivative. I converted several 'ed variables into atomic variables. They have made my work sheet unusable. They appear to randomly loose connecin to their assigned values and prevent numeric solutions by showing  up in symbolic form. Once this happens, I have to check each instance where the variable isuse to find where the loss/lossses occured. (copy and past each instance of the variable and check its value).

Once found I can't find a consistant way to re-associate them with the assigned value.

Any suggestions. See botton of attaced work sheet.

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/WS_Gen_I_and_E_for_fauls_on_HS_of_GSU_-_Time_Response_&_51V_Trip_Times_-R5a.mw .
 

Download WS_Gen_I_and_E_for_fauls_on_HS_of_GSU_-_Time_Response_&_51V_Trip_Times_-R5a.mw

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/WS_Gen_I_and_E_for_fauls_on_HS_of_GSU_-_Time_Response_&_51V_Trip_Times_-R5a.mw .
 

Download WS_Gen_I_and_E_for_fauls_on_HS_of_GSU_-_Time_Response_&_51V_Trip_Times_-R5a.mw

 

How to define 4 functions from the dsolve solution of a system of 4 differential equations?

restart: with(plots): with(DEtools):with(LinearAlgebra):with(Statistics):with(CurveFitting):with(Optimization): 
ddesys := {diff(S(t),t) = -beta*S(t)*Ix(t)/N, 
diff(Ex(t),t) = beta*S(t)*Ix(t)/N - sigma*Ex(t-tau__1),
diff(Ix(t), t) = sigma*Ex(t - tau__1)- gamma*Ix(t-tau__2), 
diff(R(t),t) = gamma*Ix(t-tau__2), 
diff(Dx(t),t) = delta*Ix(t), 
S(0) = 80900, Ex(0) = 1, Ix(0) = 1, R(0) = 0, Dx(0) = 0 }:
dsn := dsolve(eval(ddesys, {beta = 4, gamma = 0.0478, sigma = 0.10, delta = 0.0005, N=80900, tau__1 = 1.1,tau__2 = 8.7,tau__3 = 0}), numeric):
 

Hi,

Please can you give me a hand with numerical solving and visualising the partial differential wave equation with stochastic term eta(t), using methods of stochastic calculus?

diff(u(x, t), t $ 2) - (1+eta(t))*diff(u(x, t), x $ 2) = 0

I had a look at the "stochastic" package by Sasha Cyganowski, but couldn't find an example for stochastic pde.

Look forward to your help.

Thanks,

Dmitrii

Here is a known probability riddle:

A and B are two lists of 100 binary numbers:

A:=[0,1,0,1,0,1,1,0,1,1,1,0,0,1,1,1,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,1,1,1,1,0,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,0,1,1,1,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,0]:
B:=[0,1,1,0,1,1,0,1,1,1,0,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,0,1,0,1,1,0,1,1,0,0,0,0,0,0,1,0,1,1,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,1,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,0]:

One was obtained by tossing a coin (1 for a head, 0 for a tail), and the other by a human, who was asked to simulate tossing a coin.

Question: which one comes from a human brain?
The standard answer: B was produced using a coin, because (among other things) the probabilty of obtaining a "000000" or "111111" is about 80%, but a humain brain tends to avoid such "simulations".

My Question: what (if any) statistical test can be used in Maple for an answer?
(I have tried ChiSquareSuitableModelTest but both lists were accepted).

 

First 432 433 434 435 436 437 438 Last Page 434 of 2308