Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

Given a metric, to compute quantities in the NP formalism one needs to specify a null tetrad. In the various examples in the help pages, sometimes the tetrad is specified simply as a list of 4 vectors, e.g., NT := [...] and sometimes evalDG is applied as in NT := evalDG({...]). Using the first format, Maple accepted NT as argument in NPSpinCoefficients but  NPCurvatureScalars(SpinCoefficients,NT) complained that the second argument wasn't a list of four vectors. When I used the second format, both commands returned the expected results. Why the difference?

RobinsonTrautmanSpinDG.mw

How I can plot3d function s. in the domain x ,y from -1300 to 200.

Thanks

if.mw
 

"restart;   #`    x__A`=-1300..200,      `y__A`=-1300..200    u1:=(((`x__A`-200)^(2)+(`y__A`^())^(2))*0.001)/(960000);   if  u1<=0.001  then w(u1):=-0.5772-ln(u1);  else if u1>0.001  then w(u1):=-0.5772-ln(u1)+u1-((u1)^(2))/(2*2!)+((u1)^(3))/(3*3!)-((u1)^(4))/(4*4!)+((u1)^(5))/(5*5!)-((u1)^(6))/(6*6!)+((u1)^(7))/(7*7!)-((u1)^(8))/(8*8!)+((u1)^(9))/(9*9!)-((u1)^(10))/(10*10!)+((u1)^(11))/(11*11!)-((u1)^(12))/(12*12!);     end if"

Error, invalid 'if' statement

"restart;      u1:=(((`x__A`-200)^2+(`y__A`)^2)*0.001)/960000;   if u1<=0.001  then w:=(u1)->-0.5772-ln(u1);  elseif u1>0.001  then w(u1):=-0.5772-ln(u1)+u1-((u1)^2)/(2*2!)+((u1)^3)/(3*3!)-((u1)^4)/(4*4!)+((u1)^5)/(5*5!)-((u1)^6)/(6*6!)+((u1)^7)/(7*7!)-((u1)^8)/(8*8!)+((u1)^9)/(9*9!)-((u1)^10)/(10*10!)+((u1)^11)/(11*11!)-((u1)^12)/(12*12!);     end if"

 

s := 6.87*10^(-3)*w(u1); plot3d(s, x__A = -1300 .. 200, y__A = -1300 .. 200)


 

Download if.mw

 

Hello. I want to use the command verify but with two variables. For example:

verify(x^2 + y^2, 0, {'greater_equal'});

but I get FAIL as an answer. I tried adding before the verify command assume(x, 'real'); assume(y, 'real');

but notihng changed.

 

Thanks for any help.

Dear people in mapleprims,

I haven't used maple for a long time.
By the way, I tried to modify a denominator part in an fractional expression, but I couldn't.

Original expression is 

a:=-(I__22-X__2)/(I__11*I__22-I__11*X__2-I__12*I__21-I__22*X__1+X__1*X__2);

#And, I want to change this to the form

b:=(X__2-I__22)/((x__1-I__11)*(X__2-I__22)-I__12*I__21);

How can I do this?

Thank you in advance.

taro yamada

 

Hi,

I have managed to create the following plot.  It won't plot on the site's plotter:

fieldplot([1, y^2 + x], x = -10 .. 10, y = -6 .. 6, fieldstrength = fixed, color = abs(y^2 + x + 1))

I am trying to assign a colour gradient to the different vectors based on vector magnitude.  In the color option, I entered color= expresssion for the magnitude of the vectors

 

This only half worked.  It currently scales the colours such that the largest and smallest vectors are the same colour.  How do I assign a gradient such that the small magnitude vectors are one colour, and they then transition to another colour as their magnitude gets larger?

 

 

Hello. I am trying to solve this system of equations but I can't get Maple to show all solutions.

I have solve the system by hand and there are two more solutions (x=x, y=1) and (x=x, y=-1).

 

Thanks for any help !

 

Hello. I want to solve a 2X2 system using Maple. I have written this code but I do not get expected results.

restart;
with(DEtools);
with(plottools);
with(plots);
with(Algebraic);

F := -1 - y - exp(x);
G := x^2 + y*(exp(x) - 1);

sol1 := eliminate({F, G}, {x, y});

sol1 := [{x = RootOf(-exp(_Z)^2 + _Z^2 + 1), y = -exp(RootOf(-exp(_Z)^2 + _Z^2 + 1)) - 1}, {}]

But, the solutions are x=0 and y=-2 (I have solved the system by hand).

 

Any help?!

I have a parametric polynomial which is defined based on the multiplication of different variables and I want to rearrange the polynomial based on specific variables. For example, suppose the polynomial is defined as follows:

a:= (1+x+y)(2x-yx+z)(y^2-zy)

and I want to have a based on first, and second orders of x, or even other variables. Thanks

Hi so ive been working on a few codes making Eulers method and RungeKutta and Taylor Series (second order) and I cant figure out why my code is giving me a weird output? I will attach my maple files here, I can post more information if you'd like. Also have no idea how to start for taylor series so any help with code on that would be appreciated!

 


 

euler1 := proc (f, a, b, alpha, h, N) local i, t, w; i := 1; t := a; w := alpha; while i <= N do w := w+h*f(t, w); t := a+i*h; i := i+1 end do; [w] end proc

proc (f, a, b, alpha, h, N) local i, t, w; i := 1; t := a; w := alpha; while i <= N do w := w+h*f(t, w); t := a+i*h; i := i+1 end do; [w] end proc

(1)

euler1(e^(5*3-y), 0, 3, .5, .2, 2)

[.5+.2*e(0, .5)^(15-y(0, .5))+.2*e(.2, .5+.2*e(0, .5)^(15-y(0, .5)))^(15-y(.2, .5+.2*e(0, .5)^(15-y(0, .5))))]

(2)

NULL

NULL

NULL


 

Download p5one.mw
 

RK4 := proc (f, a, b, alpha, h, N) local t, w, i, k1, k2, k3, k4; i := 1; t := a; w := alpha; while i <= N do k1 := h*f(t, w); k2 := h*f(t+(1/2)*h, w+(1/2)*k1); k3 := h*f(t+(1/2)*h, w+(1/2)*k2); k4 := h*f(t+h, w+k3); w := w+(1/6)*k1+(1/3)*k2+(1/3)*k3+(1/6)*k4; t := a+i*h; i := i+1 end do; [w] end proc

proc (f, a, b, alpha, h, N) local t, w, i, k1, k2, k3, k4; i := 1; t := a; w := alpha; while i <= N do k1 := h*f(t, w); k2 := h*f(t+(1/2)*h, w+(1/2)*k1); k3 := h*f(t+(1/2)*h, w+(1/2)*k2); k4 := h*f(t+h, w+k3); w := w+(1/6)*k1+(1/3)*k2+(1/3)*k3+(1/6)*k4; t := a+i*h; i := i+1 end do; [w] end proc

(1)

RK4(exp(5*3-y), 0, 3, .5, .2, 1)

[.5+0.3333333333e-1*(exp(15-y))(0, .5)+0.6666666667e-1*(exp(15-y))(.1000000000, .5+.1000000000*(exp(15-y))(0, .5))+0.6666666667e-1*(exp(15-y))(.1000000000, .5+.1000000000*(exp(15-y))(.1000000000, .5+.1000000000*(exp(15-y))(0, .5)))+0.3333333333e-1*(exp(15-y))(.2, .5+.2*(exp(15-y))(.1000000000, .5+.1000000000*(exp(15-y))(.1000000000, .5+.1000000000*(exp(15-y))(0, .5))))]

(2)

``


 

Download rk4new.mw

 

I have an assignment for Q that after subsequent other assignments and substitutions  results in 

-XC1*R1^2/((R1^2 + XC1^2)*(R1*XC1^2/(R1^2 + XC1^2) + 12960.54302))

 

when I type Q.

 

I would like to solve this for XC1, for values of Q that make  XC1 is real. 

How do I do this?  Can I rearrange this assignment?   

I guess I could do something like this:

eq1:= -XC1*R1^2/((R1^2 + XC1^2)*(R1*XC1^2/(R1^2 + XC1^2) + 12960.54302))

solve(eq1=Q,XC1)

but Q as a function of XC1 is a derived from other relationships.

 

The worksheet probably makes what I'm asking more clear.    I was able to get the result, but I'm sure there is a better, more elegant  way to do what I needed to do...

 

Thanks
 

``

restart

Series-Parallel Conversion Equations as a function of Q

• 

Q = Xs/Rs = Rp/Xp;

• 

Rp := Rs*(Q^2 + 1);

``

``

Impedance Transpormation Equations

Rp := proc (Rs, Xs) options operator, arrow; (Rs^2+Xs^2)/Rs end proc

Xp := proc (Rs, Xs) options operator, arrow; (Rs^2+Xs^2)/Xs end proc

Rs := proc (Rp, Xp) options operator, arrow; Rp*Xp^2/(Rp^2+Xp^2) end proc

Xs := proc (Rp, Xp) options operator, arrow; Xp*Rp^2/(Rp^2+Xp^2) end proc

``

zL := 1.343+I*131.925

1.343+131.925*I

(1)

``

XL0p := Xp(Re(zL), Im(zL))

131.9386717

(2)

RLp := Rp(Re(zL), Im(zL))

12960.54302

(3)

QLp := RLp/XLp

12960.54302/XLp

(4)

XC2 := -XL0p

-131.9386717

(5)

Q := XL1/(R1s+RLp)

XL1/(R1s+12960.54302)

(6)

R1s := Rs(R1, XC1)

R1*XC1^2/(R1^2+XC1^2)

(7)

XC1s := Xs(R1, XC1)

XC1*R1^2/(R1^2+XC1^2)

(8)

XL1 := -XC1s

-XC1*R1^2/(R1^2+XC1^2)

(9)

Q

-XC1*R1^2/((R1^2+XC1^2)*(R1*XC1^2/(R1^2+XC1^2)+12960.54302))

(10)

``

tmp1 := solve(-XC1*R1^2/((R1^2+XC1^2)*(R1*XC1^2/(R1^2+XC1^2)+12960.54302)) = Tmp, XC1)

(-25000.*R1+(-0.3240135755e14*R1*Tmp^2+625000000.*R1^2-0.4199391884e18*Tmp^2)^(1/2))*R1/(Tmp*(50000.*R1+648027151.)), -1.*(25000.*R1+(-0.3240135755e14*R1*Tmp^2+625000000.*R1^2-0.4199391884e18*Tmp^2)^(1/2))*R1/(Tmp*(50000.*R1+648027151.))

(11)

"solve(indets(numer(tmp1[1]))"

{R1, Tmp, (-0.3240135755e14*R1*Tmp^2+625000000.*R1^2-0.4199391884e18*Tmp^2)^(1/2)}

(12)

simplify(solve(op(3, indets(numer(tmp1[1])))^2 > 0, Tmp, parametric))

piecewise(R1 <= -8398783768000/648027151, [[Tmp = Tmp]], R1 < 0, [[50*5^(1/2)*R1/(648027151*R1+8398783768000)^(1/2) < Tmp, Tmp < -50*5^(1/2)*R1/(648027151*R1+8398783768000)^(1/2)]], R1 = 0, [], 0 < R1, [[-50*5^(1/2)*R1/(648027151*R1+8398783768000)^(1/2) < Tmp, Tmp < 50*5^(1/2)*R1/(648027151*R1+8398783768000)^(1/2)]])

(13)

``


 

Download pi-filter_anal_copy.mw

 

 

how I can sort differential equation [q] in terms of u(x,y,z,t) and its derivatives.

In other words, we should find three relations including L11(u) ,L12 (v), and L13(w). 

For instance in L13{w) only w(x,y,z,t) and its derivatives would appear...

For example;

sort.mw


 

q := h*(A11*(diff(u(x, y, z, t), x, x)-(diff(w(x, y, z, t), x))/R+(diff(w(x, y, z, t), x))*(diff(w(x, y, z, t), x, x)))+A12*(diff(v(x, y, z, t), x, y)-(diff(w(x, y, z, t), x))/a+(diff(w(x, y, z, t), y))*(diff(w(x, y, z, t), x, y))))+h^2*(-B11*(diff(w(x, y, z, t), x, x, x))+B12*(-(diff(w(x, y, z, t), x, y, y))-(diff(v(x, y, z, t), x, y))/a))+B66*h^2*(-2*(diff(w(x, y, z, t), x, y, y))-(diff(v(x, y, z, t), x, y))/a)+A66*h*(diff(u(x, y, z, t), y, y)+diff(v(x, y, z, t), x, y)+(diff(w(x, y, z, t), y, y))*(diff(w(x, y, z, t), x))+(diff(w(x, y, z, t), y))*(diff(w(x, y, z, t), x, y))) = rho*(diff(u(x, y, z, t), t, t))-e0^2*a^2*(rho*(diff(u(x, y, z, t), t, t, x, x))+rho*(diff(u(x, y, z, t), t, t, y, y)))

h*(A11*(diff(diff(u(x, y, z, t), x), x)-(diff(w(x, y, z, t), x))/R+(diff(w(x, y, z, t), x))*(diff(diff(w(x, y, z, t), x), x)))+A12*(diff(diff(v(x, y, z, t), x), y)-(diff(w(x, y, z, t), x))/a+(diff(w(x, y, z, t), y))*(diff(diff(w(x, y, z, t), x), y))))+h^2*(-B11*(diff(diff(diff(w(x, y, z, t), x), x), x))+B12*(-(diff(diff(diff(w(x, y, z, t), x), y), y))-(diff(diff(v(x, y, z, t), x), y))/a))+B66*h^2*(-2*(diff(diff(diff(w(x, y, z, t), x), y), y))-(diff(diff(v(x, y, z, t), x), y))/a)+A66*h*(diff(diff(u(x, y, z, t), y), y)+diff(diff(v(x, y, z, t), x), y)+(diff(diff(w(x, y, z, t), y), y))*(diff(w(x, y, z, t), x))+(diff(w(x, y, z, t), y))*(diff(diff(w(x, y, z, t), x), y))) = rho*(diff(diff(u(x, y, z, t), t), t))-e0^2*a^2*(rho*(diff(diff(diff(diff(u(x, y, z, t), t), t), x), x))+rho*(diff(diff(diff(diff(u(x, y, z, t), t), t), y), y)))

(1)

``


 

Download sort.mw

 

Why won't Maple solve any of these inequalities for Q?

At first I tried solving the system of equations, but then I tried solving the inequalities individually for Q, and those too could not be solved by Maple.  What am I doing wrong?
 

restart

 

assume(R1, real, R2, real, RL, real, XC1, real, XC2, real, XL1, real)

additionally(R1 > 0, R2 > 0, RL > 0, XC1 > 0, XC2 > 0, XL1 > 0)

 

 

eq3 := R1*(4*Q^2+1)-RL > 0

0 < R1*(4*Q^2+1)-RL

(1)

eq4 := 4*Q^2*R1*RL-(R1-RL)^2 >= 0

0 <= 4*Q^2*R1*RL-(R1-RL)^2

(2)

eq5 := Rs^2*(RL-R1)/Q^2+R1^2*RL > 0

0 < Rs^2*(RL-R1)/Q^2+RL*R1^2

(3)

 

``

sys1 := {eq3, eq4, eq5}

`assuming`([solve(sys1, {Q})], [R1 > RL])

`assuming`([solve(sys1, {Q})], [R1 < RL])

solve(sys1, {Q})

Warning, solutions may have been lost

 

solve(eq3, Q)

Warning, solutions may have been lost

 

solve(eq4, Q)

Warning, solutions may have been lost

 

solve(eq5, Q)

Warning, solutions may have been lost

 

``


 

Download pi-filter_anal_copy.mw

How can I get Maple to simplify expressions into more meaningful forms?

For example, 

xc1 := -(2*Q*R1 + sqrt(4*Q^2*R1*RL - R1^2 + 2*R1*RL - RL^2))*R1/(4*Q^2*R1 + R1 - RL)

 

The numerator, under the radical, is more meaningful as sqrt(4 Q^2 R1 RL-(R1-RL)^2).

 

Similarly, the denominator can be simplified to Rs(4 Q^2+1)-RL.  

 

How do I get Maple to get me there?

I actually want to numerically solve Karhunen-Loeve Decomposition, which is reduced to homogenous Fredholm integral equation second kind when the kernel is the function of correlation of variables, by using any procedures (Galerkin is better if it is availabe). FYI, with "intsolve" I just got f(x)=0. 

I have Maple solve a system of equations.  I then want to assign the result to the different variables for use later in the worksheet.  How do I do this?
 

 

{C1 = .6666666670*Ceq, C2 = 2.000000002*Ceq, L1 = 0.1377592863e-15/Ceq, R1 = 0.8802817643e-8/Ceq}

(24)

c1 := sol3[1]

C1 = .6666666670*Ceq

(25)

l1 := sol3[2]

C2 = 2.000000002*Ceq

(26)

r1 := sol3[3]

L1 = 0.1377592863e-15/Ceq

(27)

Solutions, C2=10pf

Ceqsol := 20*e-12

20*e-12

(28)

C1sol := subs(Ceq = Ceqsol, c1)

C1 = 13.33333334*e-8.000000004

(29)
 

 

 


First, all I want to do is assign the solution value for C1 to C1.  Not being able to do this, I try to assign C1 to "different" variable c1, but the assignment is C1~=.66667* Ceq, instead of just the value of C1.  Later, I then try to substitute the value of Ceq, to get the solution for c1, and instead of just getting the value, I get  that C1= 13.33x10^-8 is assigned to C1sol, again instead of just the value, 13.33x10^-8.  How do I just assign the values to these variables instead of the expressions?

 

Thank you.

Download new_filter_solution.mw

First 10 11 12 13 14 15 16 Last Page 12 of 45