MaplePrimes Questions

The only difference between the code that works and the code that doesnt, is that in one Identity is rearranged to as such that the rhs is 0, i am really really curious to work out why this occurs, the only difference is that one evaluates to 1/2=1/2, and the other evaluates to 0=0, but i dont see why maple would return one of those evaluations as false
 

``

 

 

delta(x, y) = piecewise(x = y, 1, x <> y, 0)

 

{x}*is*the*fractional*part*of*x

 

``

 

 

`&Mscr;`(p, q) = {`mod`(p, q)+(1/4)*q*(q-1)}

"`&Dscr;`(q)="
1-(delta({(1/4)*q}, 0)+delta({(1/4)*q}, 0))+delta({(1/4)*q}, 0)*delta({(q-1)*(1/4)}, 0)+1/2*(delta({(q-2)*(1/4)}, 0)+delta({(1/4)*q}, 0)-delta({(q-2)*(1/4)}, 0)*delta({(q-3)*(1/4)}, 0))

 

 

CONJECTURE: c`in`(p, q, nonnegint^2)", `&Mscr;`(p,q)=`&Dscr;`(q)"

 

CHALLENGE: FIND: `in`(p, q, integer^2*such*that*`&Mscr;`(p, q)) and integer^2*such*that*`&Mscr;`(p, q) <> `&Dscr;`(p, q)

 

 

2, 3, 6, 7, 10, 11, 14, 15, 18, 19

 

{`mod`(p[i], p[j])+(1/4)*p[j]*(p[j]-1)} = 1-delta({(1/4)*p[j]}, 0)-delta({(p[j]-1)*(1/4)}, 0)+delta({(1/4)*p[j]}, 0)*delta({(p[j]-1)*(1/4)}, 0)+1/2*(delta({(p[j]-2)*(1/4)}, 0)+delta({(p[j]-3)*(1/4)}, 0)-delta({(p[j]-2)*(1/4)}, 0)*delta({(p[j]-3)*(1/4)}, 0))

 

 

{`mod`(p[i], p[j])+(1/4)*p[j]*(p[j]-1)} = 1-delta({(1/4)*p[j]}, 0)-delta({(p[j]-1)*(1/4)}, 0)+delta({(1/4)*p[j]}, 0)*delta({(p[j]-1)*(1/4)}, 0)+1/2*(delta({(p[j]-2)*(1/4)}, 0)+delta({(p[j]-3)*(1/4)}, 0)-delta({(p[j]-2)*(1/4)}, 0)*delta({(p[j]-3)*(1/4)}, 0))

2, 3, 6, 7, 10, 11, 14, 15, 18, 19

Numbers congruent to 2 or 3 mod 4.

 

NULL

NULL

WHEN ALL TERMS ARE PLACED ON THE LHS AND 0 ON THE OTHER, THE OUTPUT PLACES ALL p,q IN THE SET T, AS I EXPECTED.

restart; S := {}; with(combinat); with(numtheory); T := {}; F := {}; C := {}; AlphaTotal := {}; BetaTotal := {}

delta := proc (x, y) options operator, arrow; piecewise(x = y, 1, x <> y, 0) end proc

Identity := proc (p, q) options operator, arrow; frac(`mod`(p, q)+(1/4)*q*(q-1))+delta(frac((1/4)*q), 0)+delta(frac((1/4)*q-1/4), 0)-delta(frac((1/4)*q), 0)*delta(frac((1/4)*q-1/4), 0)+(1/2)*delta(frac((1/4)*q-1/2), 0)+(1/2)*delta(frac((1/4)*q-3/4), 0)-(1/2)*delta(frac((1/4)*q-1/2), 0)*delta(frac((1/4)*q-3/4), 0)-1 = 0 end proc

NULL

GenerateOddPrimeNumberPairs := proc (N) options operator, arrow; choose([seq(ithprime(k), k = 1 .. N)], 2) end proc

AssignToTrueOrFalseSet := proc (x, y) global T, F; if is(Identity(x, y)) = true then T := `union`({[x, y]}, T) else F := `union`({[x, y]}, F) end if end proc

QueryIdentity := proc (N) local P, k; P := GenerateOddPrimeNumberPairs(N); for k to nops(P) do AssignToTrueOrFalseSet(P[k][1], P[k][2]) end do end proc

QueryIdentity(20); T; F

{[2, 3], [2, 5], [2, 7], [2, 11], [2, 13], [2, 17], [2, 19], [2, 23], [2, 29], [2, 31], [2, 37], [2, 41], [2, 43], [2, 47], [2, 53], [2, 59], [2, 61], [2, 67], [2, 71], [3, 5], [3, 7], [3, 11], [3, 13], [3, 17], [3, 19], [3, 23], [3, 29], [3, 31], [3, 37], [3, 41], [3, 43], [3, 47], [3, 53], [3, 59], [3, 61], [3, 67], [3, 71], [5, 7], [5, 11], [5, 13], [5, 17], [5, 19], [5, 23], [5, 29], [5, 31], [5, 37], [5, 41], [5, 43], [5, 47], [5, 53], [5, 59], [5, 61], [5, 67], [5, 71], [7, 11], [7, 13], [7, 17], [7, 19], [7, 23], [7, 29], [7, 31], [7, 37], [7, 41], [7, 43], [7, 47], [7, 53], [7, 59], [7, 61], [7, 67], [7, 71], [11, 13], [11, 17], [11, 19], [11, 23], [11, 29], [11, 31], [11, 37], [11, 41], [11, 43], [11, 47], [11, 53], [11, 59], [11, 61], [11, 67], [11, 71], [13, 17], [13, 19], [13, 23], [13, 29], [13, 31], [13, 37], [13, 41], [13, 43], [13, 47], [13, 53], [13, 59], [13, 61], [13, 67], [13, 71], [17, 19], [17, 23], [17, 29], [17, 31], [17, 37], [17, 41], [17, 43], [17, 47], [17, 53], [17, 59], [17, 61], [17, 67], [17, 71], [19, 23], [19, 29], [19, 31], [19, 37], [19, 41], [19, 43], [19, 47], [19, 53], [19, 59], [19, 61], [19, 67], [19, 71], [23, 29], [23, 31], [23, 37], [23, 41], [23, 43], [23, 47], [23, 53], [23, 59], [23, 61], [23, 67], [23, 71], [29, 31], [29, 37], [29, 41], [29, 43], [29, 47], [29, 53], [29, 59], [29, 61], [29, 67], [29, 71], [31, 37], [31, 41], [31, 43], [31, 47], [31, 53], [31, 59], [31, 61], [31, 67], [31, 71], [37, 41], [37, 43], [37, 47], [37, 53], [37, 59], [37, 61], [37, 67], [37, 71], [41, 43], [41, 47], [41, 53], [41, 59], [41, 61], [41, 67], [41, 71], [43, 47], [43, 53], [43, 59], [43, 61], [43, 67], [43, 71], [47, 53], [47, 59], [47, 61], [47, 67], [47, 71], [53, 59], [53, 61], [53, 67], [53, 71], [59, 61], [59, 67], [59, 71], [61, 67], [61, 71], [67, 71]}

 

{}

(1)

BUT WHEN THE EQUALITY IS DEFINED AS FOLLOWS, SOME RESULTS ARE PLACED IN THE F SET. (INDICATING THE EQUALITY FOR ALL [p,q] is FALSE)

restart; S := {}; with(combinat); with(numtheory); T := {}; F := {}; C := {}; AlphaTotal := {}; BetaTotal := {}

delta := proc (x, y) options operator, arrow; piecewise(x = y, 1, x <> y, 0) end proc

Identity := proc (p, q) options operator, arrow; frac(`mod`(p, q)+(1/4)*q*(q-1)) = 1-delta(frac((1/4)*q), 0)-delta(frac((1/4)*q-1/4), 0)+delta(frac((1/4)*q), 0)*delta(frac((1/4)*q-1/4), 0)+(1/2)*delta(frac((1/4)*q-1/2), 0)+(1/2)*delta(frac((1/4)*q-3/4), 0)-(1/2)*delta(frac((1/4)*q-1/2), 0)*delta(frac((1/4)*q-3/4), 0) end proc:

``

GenerateNumberPairs := proc (N) options operator, arrow; choose([seq(ithprime(k), k = 1 .. N)], 2) end proc:

AssignToTrueOrFalseSet := proc (x, y) global T, F; if is(Identity(x, y)) = true then T := `union`({[x, y]}, T) else F := `union`({[x, y]}, F) end if end proc:

QueryIdentity := proc (N) local P, k; P := GenerateNumberPairs(N); for k to nops(P) do AssignToTrueOrFalseSet(P[k][1], P[k][2]) end do end proc:

QueryIdentity(20):

{[2, 5], [2, 13], [2, 17], [2, 29], [2, 37], [2, 41], [2, 53], [2, 61], [3, 5], [3, 13], [3, 17], [3, 29], [3, 37], [3, 41], [3, 53], [3, 61], [5, 13], [5, 17], [5, 29], [5, 37], [5, 41], [5, 53], [5, 61], [7, 13], [7, 17], [7, 29], [7, 37], [7, 41], [7, 53], [7, 61], [11, 13], [11, 17], [11, 29], [11, 37], [11, 41], [11, 53], [11, 61], [13, 17], [13, 29], [13, 37], [13, 41], [13, 53], [13, 61], [17, 29], [17, 37], [17, 41], [17, 53], [17, 61], [19, 29], [19, 37], [19, 41], [19, 53], [19, 61], [23, 29], [23, 37], [23, 41], [23, 53], [23, 61], [29, 37], [29, 41], [29, 53], [29, 61], [31, 37], [31, 41], [31, 53], [31, 61], [37, 41], [37, 53], [37, 61], [41, 53], [41, 61], [43, 53], [43, 61], [47, 53], [47, 61], [53, 61], [59, 61]}

 

{[2, 3], [2, 7], [2, 11], [2, 19], [2, 23], [2, 31], [2, 43], [2, 47], [2, 59], [2, 67], [2, 71], [3, 7], [3, 11], [3, 19], [3, 23], [3, 31], [3, 43], [3, 47], [3, 59], [3, 67], [3, 71], [5, 7], [5, 11], [5, 19], [5, 23], [5, 31], [5, 43], [5, 47], [5, 59], [5, 67], [5, 71], [7, 11], [7, 19], [7, 23], [7, 31], [7, 43], [7, 47], [7, 59], [7, 67], [7, 71], [11, 19], [11, 23], [11, 31], [11, 43], [11, 47], [11, 59], [11, 67], [11, 71], [13, 19], [13, 23], [13, 31], [13, 43], [13, 47], [13, 59], [13, 67], [13, 71], [17, 19], [17, 23], [17, 31], [17, 43], [17, 47], [17, 59], [17, 67], [17, 71], [19, 23], [19, 31], [19, 43], [19, 47], [19, 59], [19, 67], [19, 71], [23, 31], [23, 43], [23, 47], [23, 59], [23, 67], [23, 71], [29, 31], [29, 43], [29, 47], [29, 59], [29, 67], [29, 71], [31, 43], [31, 47], [31, 59], [31, 67], [31, 71], [37, 43], [37, 47], [37, 59], [37, 67], [37, 71], [41, 43], [41, 47], [41, 59], [41, 67], [41, 71], [43, 47], [43, 59], [43, 67], [43, 71], [47, 59], [47, 67], [47, 71], [53, 59], [53, 67], [53, 71], [59, 67], [59, 71], [61, 67], [61, 71], [67, 71]}

(2)

BUT CHECKING THESE RESULTS 'MANUALLY' CONFIRMS THE EQUALITY IS INDEED TRUE FOR ALL ODD PRIME PAIRS  p,q.

{seq(F[k][2], k = 1 .. nops(F))}

{3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71}

(3)

seq(frac(`mod`(F[k][1], F[k][2])+(1/4)*F[k][2]*(F[k][2]-1)), k = 1 .. nops(F))

1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2

(4)

seq(frac(-delta(frac((1/4)*F[k][2]), 0)-delta(frac((F[k][2]-1)*(1/4)), 0)+delta(frac((1/4)*F[k][2]), 0)*delta(frac((F[k][2]-1)*(1/4)), 0)+1/2*(delta(frac((F[k][2]-2)*(1/4)), 0)+delta(frac((F[k][2]-3)*(1/4)), 0)-delta(frac((F[k][2]-2)*(1/4)), 0)*delta(frac((F[k][2]-3)*(1/4)), 0))+1), k = 1 .. nops(F))

1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 1/2

(5)

[seq(frac(`mod`(T[k][1], T[k][2])+(1/4)*T[k][2]*(T[k][2]-1)), k = 2 .. nops(T))]

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

(6)

seq(frac(-delta(frac((1/4)*T[k][2]), 0)-delta(frac((T[k][2]-1)*(1/4)), 0)+delta(frac((1/4)*T[k][2]), 0)*delta(frac((T[k][2]-1)*(1/4)), 0)+1/2*(delta(frac((T[k][2]-2)*(1/4)), 0)+delta(frac((T[k][2]-3)*(1/4)), 0)-delta(frac((T[k][2]-2)*(1/4)), 0)*delta(frac((T[k][2]-3)*(1/4)), 0))+1), k = 1 .. nops(F))

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

(7)

``


 

Download KRONECKER_delta_RECIPROCITY.mw

Hello,

I am trying to plot some movement equations, but the following error keeps happening:

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

when I tryed to rewrite the equation the error became:

Error, (in DEtools/convertsys) invalid specification of initial conditions

Can someone help me with those errors?

Here is the code:


restart;

with(LinearAlgebra);
with(linalg);
with(DifferentialGeometry);
with(VariationalCalculus);
with(Tensor);
with(tensor);
with(Tools);
DGsetup([t, x, y, z], M)

g1 := evalDG(N(t)^2*`&t`(dt, dt)-a(t)^2*(`&t`(dx, dx)+`&t`(dy, dy)+`&t`(dz, dz)))

g1inv := InverseMetric(g1)

C1 := Christoffel(g1)

RM1 := CurvatureTensor(C1)

RM1g := CurvatureTensor(g1)

ContractIndices(RM1, [[1, 3]])

ContractIndices(RM1g, [[1, 3]])

RT := RicciTensor(g1, RM1)

ContractIndices(RT, g1inv, [[1, 1], [2, 2]])

S1 := RicciScalar(g1, RM1)

ContractIndices(RT, g1inv, [[1, 1], [2, 2]])

RM1contra := RaiseLowerIndices(g1inv, RM1, [2, 3, 4])

RM1cov := RaiseLowerIndices(g1, RM1, [1])

Kret1 := ContractIndices(RM1contra, RM1cov, [[1, 1], [2, 2], [3, 3], [4, 4]])

eval(simplify(subs(N(t) = 1, Kret1)))

Lag := a(t)^3*N(t)*Kret1

phi = phi(t)

Lam := -(1/2)*a(t)^3*N(t)*((diff(phi, t))^2/N(t)^2+m^2*phi)

Ltot := Lag+Lam

EqELN := EulerLagrange(Ltot, t, N(t))

EqN := eval(simplify(subs(N(t) = 1, EqELN)))

Eqa := subs(N(t) = 1, Ltot)

EqELa := EulerLagrange(EqaD, t, a(t))

tini := 0

with(DEtools)

with(plots)

tfin = 10

(D(a))(tini) = 0

((D@@2)(a))(tini) = 0

((D@@3)(a))(tini) = 0

phi := a^-3

Dphi := 0

(D(N))(tini) = 0

((D@@2)(N))(tini) = 0

((D@@3)(N))(tini) = 0

sys1 := {EqN, a(tini) = 0.1e-2, (D(a))(tini) = 0.1e-2, ((D@@2)(a))(tini) = 0.1e-2, ((D@@3)(a))(tini) = 1}

tfin = 2

p1 := dsolve(sys1, type = numeric, abserr = 1.*10^(-8), relerr = 1.*10^(-8), range = tini .. tfin)

figN := odeplot(p1, [t, a(t)])

sys2 := {EqELa, a(tini) = 0.1e-6, (D(a))(tini) = 0.1e-4, ((D@@2)(a))(tini) = 0.1e-5, ((D@@3)(a))(tini) = 1, ((D@@4)(a))(tini) = 0.1e-5}

p2 := dsolve(sys2, type = numeric, abserr = 1.*10^(-8), relerr = 1.*10^(-8), range = tini .. tfin)

figa := odeplot(p2, [t, a(t)])

 

How do I plot the following with Maple 2015?

For my differential equations class we have to input the following problem into Maple, I've never used maple before and I was wondering if someone who is experienced with maple could help me out with the code to put into Maple. Thanks I appreciate it!

 

Using the Maple program, Write the procedure RungeKutta(f, a, b, aplpha, n) which use the improved Euler's method to approximate the solution of the initial-value problem y'=f(t,y), a\leqt\leqb, y(a)= alpha at (n+1) equally spaced numbers in the interval [a,b]

The input parameters are as follow:

f is the name of the function f(t,y);

a and b are the end points of the interval of integration;

alpha is the initial condition.

The output: array w is the approximation of y at the (n+1) values of t.

Hi, 

 

I'm really not sure what else to say that isnt already obvious from the worksheet i uploaded, it's pretty obvious what i am trying to do i just dont understand what neutral operator even is, and couldn't find anything on the help page i was directed to by the error.

 


 

with(StringTools):

Join([convert(A, 'string'), "=", convert(B, 'string'), "(mod", convert(Set2[1], 'string'), ")"])

"A = B (mod Set2[1] )"

(1)

"convert(&equiv;,'string')"

Error, invalid neutral operator

"convert(&equiv;,'string')"

 

``


 

Download INVALID_NEUTRAL_OPERATOR.mw

I employed the sort command to sort through 10 solutions to a series of order 10.  However, I do not follow the logic of the output.  So I attempted to sort by ascending order by the magnitude, but I am getting errors which I am having trouble circumnavigating.  Can show me how to sort my solutions properly?

The worksheet is in my reply below.

restart;
with(PDEtools);
assume(k::real, x::real, omega::real, t::real, theta::real, c::real);
tr0 := c*(t*upsilon+x) = xi;
tr1 := I*(k*x+omega*t+theta);
tr2 := phi(lhs(tr0))*exp(tr1);
PDE := proc (u) options operator, arrow; I*(diff(u, t))+diff(u, x, x)-I*sigma*u*(conjugate(u)*(diff(u, x))-u*(diff(conjugate(u), x))) end proc;
Eq1 := PDE(tr2);
Eq2 := simplify(convert(expand(subs(tr0, Eq1)), diff));

for_maple_prime.mw

Hi, I'm currently studying the dynamics of a system of ODEs and I would like to plot a bifurcation diagram using Maple.

 

The system is:

diff(x(t), t) = -y(t)-z(t)

 diff(y(t), t) = x(t)+a*y(t)

diff(z(t), t) = b+x(t)*z(t)-c*z(t).

 

Can anyone help me with a procedure to output a bifurcation diagram for the system?
Thanks.

Dear Users,

Recently, I started using Maple2017. In Maple 18, I have used the following commands for import/export and it worked fine.

 

Digits := 50;

Rhs:= ImportVector("/home/15_degree_3izto1_fixed/Vec.txt", source = delimited);

MatA:=ImportMatrix("/home/15_degree_3izto1_fixed/Mat.txt", source = delimited) ;

Note : Vec.txt contains float with 50 digits, and Mat.txt contains algebraic equation eg. 123456716798271394816*y+173974937*10^(-16)

 

While maple 18 used to import all the informations with 50 digits of accuracy, Maple2017 only import float[8] ?It only imports first 20 digits and so on..? What has changed in 2017?

Thanks and regards,

 

1.

with(Groebner):
K := {r-x^4,u-(x^3)*y,v-x*y^3,w-y^4};
G := Basis(K, 'tord', degrevlex(r,u,v,w));
R1 := eliminate(G, {r,u,v,w}); # eliminate is the reverse of Basis
Ga := Basis({a*G[1],a*G[2],a*G[3],a*G[4],a*G[5],a*G[6],a*G[7],a*G[8],a*G[9],a*G[10],a*G[11],a*G[12],a*G[13],a*G[14], (1-a)*K[1], (1-a)*K[2], (1-a)*K[3], (1-a)*K[4]}, 'tord', deglex(a,r,u,v,w));
Ga := remove(has, Ga, [x,y,a]);
eliminate(Ga, [r,u,v,w]);

how to eliminate Ga to find back K ?

2.

A1A2 and A3A4 parallel
A(0,0), B(u1,0), D(u2,u3), C(x1,x2), E(x3,x4)
#BC = A1A2
xx1 := u1:
xx2 := x1:
yy1 := 0:
yy2 := x2:
#AD = A3A4
xx3 := 0:
xx4 := u2:
yy3 := 0:
yy4 := u3:
eq1 := (xx2 - xx1)*(yy4 - yy3) - (yy2 - yy1)*(xx4 - xx3);
(x1-u1)*u3-x2*u2;
#CD = A1A2
xx1 := x1:
xx2 := u2:
yy1 := x2:
yy2 := u3:
#AB = A3A4
xx3 := 0:
xx4 := u1:
yy3 := 0:
yy4 := 0:
eq2 := (xx2 - xx1)*(yy4 - yy3) - (yy2 - yy1)*(xx4 - xx3);
-(u3-x2)*u1;
with(LinearAlgebra):
#E is on the same line of AC
xx1 := x3:
yy1 := x4:
xx2 := 0:
yy2 := 0:
xx3 := x1:
yy3 := x2:
eq3 := Determinant(Matrix([[xx1,yy1,1],[xx2,yy2,1],[xx3,yy3,1]]));
-x3*x2+x1*x4;
#E is on the same line of BD
xx1 := x3:
yy1 := x4:
xx2 := u1:
yy2 := 0:
xx3 := u2:
yy3 := u3:
eq4 := Determinant(Matrix([[xx1,yy1,1],[xx2,yy2,1],[xx3,yy3,1]]));
-x3*u3+u1*u3-u1*x4+u2*x4;
 

sol := eliminate({eq1,eq2,eq3,eq4},[x1,x2,x3,x4]);

with(Groebner):
K := {(rhs(sol[1][1])-lhs(sol[1][1])),(rhs(sol[1][2])-lhs(sol[1][2])),(rhs(sol[1][3])-lhs(sol[1][3])),(rhs(sol[1][4])-lhs(sol[1][4]))};
G := Basis(K, 'tord', degrevlex(x1,x2,x3,x4));
R1 := eliminate(G, {x1,x2,x3,x4}); # eliminate is the reverse of Basis
Ga := Basis({a*G[1],a*G[2],a*G[3],a*G[4], (1-a)*K[1], (1-a)*K[2], (1-a)*K[3], (1-a)*K[4]}, 'tord', deglex(a,x1,x2,x3,x4));
Ga := remove(has, Ga, [u1,u2,u3,u4,a]);

From Question1, is it possible to find from sol to eq1, eq2, eq3 and eq4 ?

restart;
with(PDEtools);
assume(k::real, x::real, omega::real, t::real, theta::real, c::real);
u := phi(c*(t*upsilon+x))*exp(I*(k*x+omega*t+theta));
PDE := proc (u) options operator, arrow; I*(diff(u, t))+diff(u, x, x)-I*sigma*u*(conjugate(u)*(diff(u, x))-u*conjugate(diff(u, x))) end proc;
Eq1 := PDE(u)

For example

if x*y*z+ x*y^2

after filter 

x*y*z

I have resolved the roots of a series both numerically & analytically.  Let me qualify numerical  versus analytical.  Analytically I evaluate the series without substituting values for the various parameters of the series.  I then differentiate the series, then substitute in the appropriate parametric values, & then solve.  By this method I obtained 5 complex roots.

The numerical approach has values already assigned to the parameters of the series.  I then differentiate & solve.  I obtain only REAL roots in this instance.  I then restricted these results to obtain the solution I believe to be correct given by result (7).

I cannot seem to steer the solver in the analytic case to obtain the correct REAL result that I am expecting.  Can anyone help on this?

Before any website moderator thinks this is the same question as Error-in-Isinternal-Too-Many-Levels, it is not.  I have resolved that question.  This is a different question, but on the same problem!

reconcile_solns.mw

hi, i have an expression "f" and i want to substitute the expression with Square root with another namee like phi, how should i do that? i should not use solve commands since the expression is more complicated and i have just pick part of it. tnx in advance.

 

restart

f:=(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2)*(1/sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2))*(1/omega^2);

(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2)/((6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)^(1/2)*omega^2)

(1)

subs(sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)=phi,f);

(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2)/((6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)^(1/2)*omega^2)

(2)

factor(simplify(f,{sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2) = phi}));

Error, (in simplify/siderels:-simplify/siderels) side relations must be polynomials in (name or function) variables

 

simplify(algsubs(sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)=phi,  f))

Error, (in algsubs) no variables appearing rationally in pattern

 

# i want sth like this :

(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2)/(phi*omega^2)

(3)

``


 

Download problem.mw

Hi,

I tried a Animation with 10 randoms HeatMaps:

restart:

with(Statistics): with(LinearAlgebra); randomize(): with(plots):

f:= rand( 1..2 ):

for n to 10 do :
RM := Matrix(10, 10, proc (i, j) options operator, arrow; (-1)^f() end proc);
G[n] := HeatMap(RM, axis = [gridlines = [10, color = blue], thickness = 2]) ;
end do
display(seq(G[n], n = 1 .. 10), insequence = true);


But this is nor work as well. How do i this?

Regards.
 

First 878 879 880 881 882 883 884 Last Page 880 of 2460