Ronan

827 Reputation

14 Badges

11 years, 201 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are answers submitted by Ronan

I asked the same question a couple on months age

@C_R answered it as follows

inserts a new execution group before the cursor.

For pasted text you could try F3 to split the text at the postition of the cursor.

from the menu should also work.

Here are two possible ways assuming I have understood you question correctly. I renamed your list to l to avoid confusion.

restart

with(LinearAlgebra)

l := [seq(2*i-1, i = 1 .. 10)]

[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]

(1)

for i in l do A[i] := (x/a)^(i+1)*(1-x/a)^2 end do

x^2*(1-x/a)^2/a^2

 

x^4*(1-x/a)^2/a^4

 

x^6*(1-x/a)^2/a^6

 

x^8*(1-x/a)^2/a^8

 

x^10*(1-x/a)^2/a^10

 

x^12*(1-x/a)^2/a^12

 

x^14*(1-x/a)^2/a^14

 

x^16*(1-x/a)^2/a^16

 

x^18*(1-x/a)^2/a^18

 

x^20*(1-x/a)^2/a^20

(2)

~# Or use seq

A := [seq((x/a)^(i+1)*(1-x/a)^2, `in`(i, l))]

[x^2*(1-x/a)^2/a^2, x^4*(1-x/a)^2/a^4, x^6*(1-x/a)^2/a^6, x^8*(1-x/a)^2/a^8, x^10*(1-x/a)^2/a^10, x^12*(1-x/a)^2/a^12, x^14*(1-x/a)^2/a^14, x^16*(1-x/a)^2/a^16, x^18*(1-x/a)^2/a^18, x^20*(1-x/a)^2/a^20]

(3)

A[4]

x^8*(1-x/a)^2/a^8

(4)

 

Download 3a.mw

Square brackets are incorrect use parenthesis ()

1/2*int(D__11*diff(w, x, x)^2 + 2*D__12*diff(w, x, x)*diff(w, y, y) + 4*D[66]*diff(w, x, y)^2 + D[22]*diff(w, y, y)^2 - 2*q*w, [x = 0 .. b, y = 0 .. a])

I got 

(((144*D__11*c[1]^2)/(5*a^8*b^3) - 72*D__11*c[1]^2/(a^7*b^4) + 64*D__11*c[1]^2/(a^6*b^5) - 24*D__11*c[1]^2/(a^5*b^6) + 4*D__11*c[1]^2/(a^4*b^7))*a^9)/18 + ((-(576*D__11*c[1]^2)/(5*a^8*b^2) + 288*D__11*c[1]^2/(a^7*b^3) - 256*D__11*c[1]^2/(a^6*b^4) + 96*D__11*c[1]^2/(a^5*b^5) - 16*D__11*c[1]^2/(a^4*b^6))*a^8)/16 + ((((288*D__12*c[1]^2/(a^8*b^8) + 1024*D[66]*c[1]^2/(a^8*b^8))*b^7)/7 + ((-864*D__12*c[1]^2/(a^7*b^8) - 3072*D[66]*c[1]^2/(a^7*b^8))*b^6)/6 + ((864*D__11*c[1]^2/(a^8*b^6) + 912*D__12*c[1]^2/(a^6*b^8) + 3328*D[66]*c[1]^2/(a^6*b^8))*b^5)/5 + ((-1728*D__11*c[1]^2/(a^7*b^6) - 384*D__12*c[1]^2/(a^5*b^8) - 1536*D[66]*c[1]^2/(a^5*b^8))*b^4)/4 + ((1152*D__11*c[1]^2/(a^6*b^6) + 48*D__12*c[1]^2/(a^4*b^8) + 256*D[66]*c[1]^2/(a^4*b^8))*b^3)/3 - 144*D__11*c[1]^2/(a^5*b^4) + 24*D__11*c[1]^2/(a^4*b^5))*a^7)/14 + ((((-864*D__12*c[1]^2/(a^8*b^7) - 3072*D[66]*c[1]^2/(a^8*b^7))*b^7)/7 + ((2592*D__12*c[1]^2/(a^7*b^7) + 9216*D[66]*c[1]^2/(a^7*b^7))*b^6)/6 + ((-576*D__11*c[1]^2/(a^8*b^5) - 2736*D__12*c[1]^2/(a^6*b^7) - 9984*D[66]*c[1]^2/(a^6*b^7))*b^5)/5 + ((1152*D__11*c[1]^2/(a^7*b^5) + 1152*D__12*c[1]^2/(a^5*b^7) + 4608*D[66]*c[1]^2/(a^5*b^7))*b^4)/4 + ((-768*D__11*c[1]^2/(a^6*b^5) - 144*D__12*c[1]^2/(a^4*b^7) - 768*D[66]*c[1]^2/(a^4*b^7))*b^3)/3 + 96*D__11*c[1]^2/(a^5*b^3) - 16*D__11*c[1]^2/(a^4*b^4))*a^6)/12 + ((16*D[22]*c[1]^2*b/a^8 - 72*D[22]*c[1]^2/a^7 + ((912*D__12*c[1]^2/(a^8*b^6) + 3328*D[66]*c[1]^2/(a^8*b^6) + 864*D[22]*c[1]^2/(a^6*b^8))*b^7)/7 + ((-2736*D__12*c[1]^2/(a^7*b^6) - 9984*D[66]*c[1]^2/(a^7*b^6) - 576*D[22]*c[1]^2/(a^5*b^8))*b^6)/6 + ((144*D__11*c[1]^2/(a^8*b^4) + 2888*D__12*c[1]^2/(a^6*b^6) + 10816*D[66]*c[1]^2/(a^6*b^6) + 144*D[22]*c[1]^2/(a^4*b^8) - 2*q*c[1]/(a^4*b^4))*b^5)/5 + ((-288*D__11*c[1]^2/(a^7*b^4) - 1216*D__12*c[1]^2/(a^5*b^6) - 4992*D[66]*c[1]^2/(a^5*b^6) + 4*q*c[1]/(a^3*b^4))*b^4)/4 + ((192*D__11*c[1]^2/(a^6*b^4) + 152*D__12*c[1]^2/(a^4*b^6) + 832*D[66]*c[1]^2/(a^4*b^6) - 2*q*c[1]/(a^2*b^4))*b^3)/3 - 24*D__11*c[1]^2/(a^5*b^2) + 4*D__11*c[1]^2/(a^4*b^3))*a^5)/10 + ((-32*D[22]*c[1]^2*b^2/a^8 + 144*D[22]*c[1]^2*b/a^7 + ((-384*D__12*c[1]^2/(a^8*b^5) - 1536*D[66]*c[1]^2/(a^8*b^5) - 1728*D[22]*c[1]^2/(a^6*b^7))*b^7)/7 + ((1152*D__12*c[1]^2/(a^7*b^5) + 4608*D[66]*c[1]^2/(a^7*b^5) + 1152*D[22]*c[1]^2/(a^5*b^7))*b^6)/6 + ((-1216*D__12*c[1]^2/(a^6*b^5) - 4992*D[66]*c[1]^2/(a^6*b^5) - 288*D[22]*c[1]^2/(a^4*b^7) + 4*q*c[1]/(a^4*b^3))*b^5)/5 + ((512*D__12*c[1]^2/(a^5*b^5) + 2304*D[66]*c[1]^2/(a^5*b^5) - 8*q*c[1]/(a^3*b^3))*b^4)/4 + ((-64*D__12*c[1]^2/(a^4*b^5) - 384*D[66]*c[1]^2/(a^4*b^5) + 4*q*c[1]/(a^2*b^3))*b^3)/3)*a^4)/8 + (((64*D[22]*c[1]^2*b^3)/(3*a^8) - 96*D[22]*c[1]^2*b^2/a^7 + ((48*D__12*c[1]^2/(a^8*b^4) + 256*D[66]*c[1]^2/(a^8*b^4) + 1152*D[22]*c[1]^2/(a^6*b^6))*b^7)/7 + ((-144*D__12*c[1]^2/(a^7*b^4) - 768*D[66]*c[1]^2/(a^7*b^4) - 768*D[22]*c[1]^2/(a^5*b^6))*b^6)/6 + ((152*D__12*c[1]^2/(a^6*b^4) + 832*D[66]*c[1]^2/(a^6*b^4) + 192*D[22]*c[1]^2/(a^4*b^6) - 2*q*c[1]/(a^4*b^2))*b^5)/5 + ((-64*D__12*c[1]^2/(a^5*b^4) - 384*D[66]*c[1]^2/(a^5*b^4) + 4*q*c[1]/(a^3*b^2))*b^4)/4 + ((8*D__12*c[1]^2/(a^4*b^4) + 64*D[66]*c[1]^2/(a^4*b^4) - 2*q*c[1]/(a^2*b^2))*b^3)/3)*a^3)/6 + ((-(16*D[22]*c[1]^2*b^4)/(3*a^8) + 24*D[22]*c[1]^2*b^3/a^7 - (288*D[22]*c[1]^2*b^2)/(7*a^6) + 32*D[22]*c[1]^2*b/a^5 - (48*D[22]*c[1]^2)/(5*a^4))*a^2)/4 + (2*D[22]*c[1]^2*b^5)/(9*a^7) - D[22]*c[1]^2*b^4/a^6 + (12*D[22]*c[1]^2*b^3)/(7*a^5) - (4*D[22]*c[1]^2*b^2)/(3*a^4) + (2*D[22]*c[1]^2*b)/(5*a^3)

 

This shows basically what is happening and why Maple gives answers you have. The are correct.

restart

 

A := sqrt(x^2-10*x+1) = sqrt(-8*x^2+9*x-1)

(x^2-10*x+1)^(1/2) = (-8*x^2+9*x-1)^(1/2)

plot([lhs(A), rhs(A)], x = 0 .. 2.5)

 

A^2

x^2-10*x+1 = -8*x^2+9*x-1

B := lhs(A^2)-rhs(A^2)

9*x^2-19*x+2

solve(B)

2, 1/9

eval(A, x = 2)

(-15)^(1/2) = (-15)^(1/2)

eval(A, x = 1/9)

(1/81)*(-8)^(1/2)*81^(1/2) = (1/81)*(-8)^(1/2)*81^(1/2)

NULL

Download A_23-2-23-how_maple_gets_answer.mw

You had set B= Omega. Needs to be B:=Omega

restart

A := Omega; assume(Omega > 0); B := Omega

Omega

B

Omega

 

Download assumetest-1.mw

Try setting q:=p^2. That will get rid of the fractional exponents.

Here are two potential ways around you issue.
 

restart

NULL

a := U(xi)

U(xi)

b := y(xi)

y(xi)

could use double delayed evaluation quotes   '' ...   '' but then can't use a^2*b^5

convert(''U(xi)^2*y(xi)^5'', list)

[U(xi)^2, y(xi)^5]

or  enclose computation an square brackets

c := [a^2*b^5]

[U(xi)^2*y(xi)^5]

c

[U(xi)^2*y(xi)^5]

NULL


 

Download 22-7-22_A_List.mw

I checked this in Maple 18 (not Maple 2018) and Maple 2022.  I don't have Maple 2020 installed anymore.

eq := solve(expand((20 + 20*T + 2*T*(T + 1))*exp(-T) - 10*exp(-2*T) - 2*T - 10.0))

answers from Maple2022 

eq := 1.411454823, 0.

answers from Maple 18

1.411454823, -0., 0.

If you use 10 instead of 10.0 the numerical answers need to be extracted using "allvalues(%)" In this case Maple 18 returns four root solutions but only evaluates two of the to numerical values. Maple 2022 returns two root solutions

 

Beyond that I have no explination.

 


Firstly you are better off using the modern LinearAlgebra package. I converted some of you code to suit.

I created a matrix Hnew is what you are looking for

restart;

kernelopts(version);

`Maple 2022.0, X86 64 WINDOWS, Mar 8 2022, Build ID 1599809`

(1)

with(LinearAlgebra);

[`&x`, Add, Adjoint, BackwardSubstitute, BandMatrix, Basis, BezoutMatrix, BidiagonalForm, BilinearForm, CARE, CharacteristicMatrix, CharacteristicPolynomial, Column, ColumnDimension, ColumnOperation, ColumnSpace, CompanionMatrix, CompressedSparseForm, ConditionNumber, ConstantMatrix, ConstantVector, Copy, CreatePermutation, CrossProduct, DARE, DeleteColumn, DeleteRow, Determinant, Diagonal, DiagonalMatrix, Dimension, Dimensions, DotProduct, EigenConditionNumbers, Eigenvalues, Eigenvectors, Equal, ForwardSubstitute, FrobeniusForm, FromCompressedSparseForm, FromSplitForm, GaussianElimination, GenerateEquations, GenerateMatrix, Generic, GetResultDataType, GetResultShape, GivensRotationMatrix, GramSchmidt, HankelMatrix, HermiteForm, HermitianTranspose, HessenbergForm, HilbertMatrix, HouseholderMatrix, IdentityMatrix, IntersectionBasis, IsDefinite, IsOrthogonal, IsSimilar, IsUnitary, JordanBlockMatrix, JordanForm, KroneckerProduct, LA_Main, LUDecomposition, LeastSquares, LinearSolve, LyapunovSolve, Map, Map2, MatrixAdd, MatrixExponential, MatrixFunction, MatrixInverse, MatrixMatrixMultiply, MatrixNorm, MatrixPower, MatrixScalarMultiply, MatrixVectorMultiply, MinimalPolynomial, Minor, Modular, Multiply, NoUserValue, Norm, Normalize, NullSpace, OuterProductMatrix, Permanent, Pivot, PopovForm, ProjectionMatrix, QRDecomposition, RandomMatrix, RandomVector, Rank, RationalCanonicalForm, ReducedRowEchelonForm, Row, RowDimension, RowOperation, RowSpace, ScalarMatrix, ScalarMultiply, ScalarVector, SchurForm, SingularValues, SmithForm, SplitForm, StronglyConnectedBlocks, SubMatrix, SubVector, SumBasis, SylvesterMatrix, SylvesterSolve, ToeplitzMatrix, Trace, Transpose, TridiagonalForm, UnitVector, VandermondeMatrix, VectorAdd, VectorAngle, VectorMatrixMultiply, VectorNorm, VectorScalarMultiply, ZeroMatrix, ZeroVector, Zip]

(2)

alias(phi = phi(x, t), chi = chi(x, t), psi = psi(x, t), rho = rho(x, t));

phi, chi, psi, rho

(3)

NULL

H[1]:=Matrix([[epsilon[1]*phi[1],conjugate(epsilon[2])*(phi[1]),conjugate(chi[1]),0],

           [epsilon[2]*psi[1],-conjugate(epsilon[1])*(psi[1]),0,conjugate(rho[1])],

           [-chi[1],0,conjugate(epsilon[1])*conjugate(phi[1]),conjugate(epsilon[2])*conjugate(phi[1])],

         [0,rho[1],-epsilon[2]*conjugate(psi[1]),epsilon[1]*conjugate(psi[1])]]);

 

 

Matrix(4, 4, {(1, 1) = `ε`[1]*phi(x, t)[1], (1, 2) = conjugate(`ε`[2])*phi(x, t)[1], (1, 3) = conjugate(chi(x, t)[1]), (1, 4) = 0, (2, 1) = `ε`[2]*psi(x, t)[1], (2, 2) = -conjugate(`ε`[1])*psi(x, t)[1], (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[1]), (3, 1) = -chi(x, t)[1], (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[1]), (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[1]), (4, 1) = 0, (4, 2) = rho(x, t)[1], (4, 3) = -`ε`[2]*conjugate(psi(x, t)[1]), (4, 4) = `ε`[1]*conjugate(psi(x, t)[1])})

(4)

H[2]:=Matrix([[epsilon[1]*phi[2],conjugate(epsilon[2])*(phi[2]),conjugate(chi[2]),0],

           [epsilon[2]*psi[2],-conjugate(epsilon[1])*(psi[2]),0,conjugate(rho[2])],

           [-chi[2],0,conjugate(epsilon[1])*conjugate(phi[2]),conjugate(epsilon[2])*conjugate(phi[2])],

         [0,rho[2],-epsilon[2]*conjugate(psi[2]),epsilon[1]*conjugate(psi[2])]]);

Matrix(4, 4, {(1, 1) = `ε`[1]*phi(x, t)[2], (1, 2) = conjugate(`ε`[2])*phi(x, t)[2], (1, 3) = conjugate(chi(x, t)[2]), (1, 4) = 0, (2, 1) = `ε`[2]*psi(x, t)[2], (2, 2) = -conjugate(`ε`[1])*psi(x, t)[2], (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[2]), (3, 1) = -chi(x, t)[2], (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[2]), (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[2]), (4, 1) = 0, (4, 2) = rho(x, t)[2], (4, 3) = -`ε`[2]*conjugate(psi(x, t)[2]), (4, 4) = `ε`[1]*conjugate(psi(x, t)[2])})

(5)

Lambda[1]:=Matrix([[lambda[1],0,0,0],[0,lambda[1],0,0],[0,0,conjugate(lambda[1]),0],[0,0,0,conjugate(lambda[1])]]);

Matrix(4, 4, {(1, 1) = lambda[1], (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = lambda[1], (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = conjugate(lambda[1]), (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = conjugate(lambda[1])})

(6)

Lambda[2]:=Matrix([[lambda[2],0,0,0],[0,lambda[2],0,0],[0,0,conjugate(lambda[2]),0],[0,0,0,conjugate(lambda[2])]]);

Matrix(4, 4, {(1, 1) = lambda[2], (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = lambda[2], (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = conjugate(lambda[2]), (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = conjugate(lambda[2])})

(7)

H11:=H[1].Lambda[1];

Matrix(4, 4, {(1, 1) = `ε`[1]*phi(x, t)[1]*lambda[1], (1, 2) = conjugate(`ε`[2])*phi(x, t)[1]*lambda[1], (1, 3) = conjugate(chi(x, t)[1])*conjugate(lambda[1]), (1, 4) = 0, (2, 1) = `ε`[2]*psi(x, t)[1]*lambda[1], (2, 2) = -conjugate(`ε`[1])*psi(x, t)[1]*lambda[1], (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[1])*conjugate(lambda[1]), (3, 1) = -chi(x, t)[1]*lambda[1], (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[1])*conjugate(lambda[1]), (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[1])*conjugate(lambda[1]), (4, 1) = 0, (4, 2) = rho(x, t)[1]*lambda[1], (4, 3) = -`ε`[2]*conjugate(psi(x, t)[1])*conjugate(lambda[1]), (4, 4) = `ε`[1]*conjugate(psi(x, t)[1])*conjugate(lambda[1])})

(8)

H12:=H[2].Lambda[2];

Matrix(4, 4, {(1, 1) = `ε`[1]*phi(x, t)[2]*lambda[2], (1, 2) = conjugate(`ε`[2])*phi(x, t)[2]*lambda[2], (1, 3) = conjugate(chi(x, t)[2])*conjugate(lambda[2]), (1, 4) = 0, (2, 1) = `ε`[2]*psi(x, t)[2]*lambda[2], (2, 2) = -conjugate(`ε`[1])*psi(x, t)[2]*lambda[2], (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[2])*conjugate(lambda[2]), (3, 1) = -chi(x, t)[2]*lambda[2], (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[2])*conjugate(lambda[2]), (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[2])*conjugate(lambda[2]), (4, 1) = 0, (4, 2) = rho(x, t)[2]*lambda[2], (4, 3) = -`ε`[2]*conjugate(psi(x, t)[2])*conjugate(lambda[2]), (4, 4) = `ε`[1]*conjugate(psi(x, t)[2])*conjugate(lambda[2])})

(9)

H13:=H[1].Lambda[1].Lambda[1];

Matrix(4, 4, {(1, 1) = `ε`[1]*phi(x, t)[1]*lambda[1]^2, (1, 2) = conjugate(`ε`[2])*phi(x, t)[1]*lambda[1]^2, (1, 3) = conjugate(chi(x, t)[1])*conjugate(lambda[1])^2, (1, 4) = 0, (2, 1) = `ε`[2]*psi(x, t)[1]*lambda[1]^2, (2, 2) = -conjugate(`ε`[1])*psi(x, t)[1]*lambda[1]^2, (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[1])*conjugate(lambda[1])^2, (3, 1) = -chi(x, t)[1]*lambda[1]^2, (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[1])*conjugate(lambda[1])^2, (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[1])*conjugate(lambda[1])^2, (4, 1) = 0, (4, 2) = rho(x, t)[1]*lambda[1]^2, (4, 3) = -`ε`[2]*conjugate(psi(x, t)[1])*conjugate(lambda[1])^2, (4, 4) = `ε`[1]*conjugate(psi(x, t)[1])*conjugate(lambda[1])^2})

(10)

H14:=H[2].Lambda[2].Lambda[2];

Matrix(4, 4, {(1, 1) = `ε`[1]*phi(x, t)[2]*lambda[2]^2, (1, 2) = conjugate(`ε`[2])*phi(x, t)[2]*lambda[2]^2, (1, 3) = conjugate(chi(x, t)[2])*conjugate(lambda[2])^2, (1, 4) = 0, (2, 1) = `ε`[2]*psi(x, t)[2]*lambda[2]^2, (2, 2) = -conjugate(`ε`[1])*psi(x, t)[2]*lambda[2]^2, (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[2])*conjugate(lambda[2])^2, (3, 1) = -chi(x, t)[2]*lambda[2]^2, (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[2])*conjugate(lambda[2])^2, (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[2])*conjugate(lambda[2])^2, (4, 1) = 0, (4, 2) = rho(x, t)[2]*lambda[2]^2, (4, 3) = -`ε`[2]*conjugate(psi(x, t)[2])*conjugate(lambda[2])^2, (4, 4) = `ε`[1]*conjugate(psi(x, t)[2])*conjugate(lambda[2])^2})

(11)

H115:=Matrix([H[1],H[2]]);

Matrix(4, 8, {(1, 1) = `ε`[1]*phi(x, t)[1], (1, 2) = conjugate(`ε`[2])*phi(x, t)[1], (1, 3) = conjugate(chi(x, t)[1]), (1, 4) = 0, (1, 5) = `ε`[1]*phi(x, t)[2], (1, 6) = conjugate(`ε`[2])*phi(x, t)[2], (1, 7) = conjugate(chi(x, t)[2]), (1, 8) = 0, (2, 1) = `ε`[2]*psi(x, t)[1], (2, 2) = -conjugate(`ε`[1])*psi(x, t)[1], (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[1]), (2, 5) = `ε`[2]*psi(x, t)[2], (2, 6) = -conjugate(`ε`[1])*psi(x, t)[2], (2, 7) = 0, (2, 8) = conjugate(rho(x, t)[2]), (3, 1) = -chi(x, t)[1], (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[1]), (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[1]), (3, 5) = -chi(x, t)[2], (3, 6) = 0, (3, 7) = conjugate(`ε`[1])*conjugate(phi(x, t)[2]), (3, 8) = conjugate(`ε`[2])*conjugate(phi(x, t)[2]), (4, 1) = 0, (4, 2) = rho(x, t)[1], (4, 3) = -`ε`[2]*conjugate(psi(x, t)[1]), (4, 4) = `ε`[1]*conjugate(psi(x, t)[1]), (4, 5) = 0, (4, 6) = rho(x, t)[2], (4, 7) = -`ε`[2]*conjugate(psi(x, t)[2]), (4, 8) = `ε`[1]*conjugate(psi(x, t)[2])})

(12)

H15:=Matrix([H11,H12]);

Matrix(4, 8, {(1, 1) = `ε`[1]*phi(x, t)[1]*lambda[1], (1, 2) = conjugate(`ε`[2])*phi(x, t)[1]*lambda[1], (1, 3) = conjugate(chi(x, t)[1])*conjugate(lambda[1]), (1, 4) = 0, (1, 5) = `ε`[1]*phi(x, t)[2]*lambda[2], (1, 6) = conjugate(`ε`[2])*phi(x, t)[2]*lambda[2], (1, 7) = conjugate(chi(x, t)[2])*conjugate(lambda[2]), (1, 8) = 0, (2, 1) = `ε`[2]*psi(x, t)[1]*lambda[1], (2, 2) = -conjugate(`ε`[1])*psi(x, t)[1]*lambda[1], (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[1])*conjugate(lambda[1]), (2, 5) = `ε`[2]*psi(x, t)[2]*lambda[2], (2, 6) = -conjugate(`ε`[1])*psi(x, t)[2]*lambda[2], (2, 7) = 0, (2, 8) = conjugate(rho(x, t)[2])*conjugate(lambda[2]), (3, 1) = -chi(x, t)[1]*lambda[1], (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[1])*conjugate(lambda[1]), (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[1])*conjugate(lambda[1]), (3, 5) = -chi(x, t)[2]*lambda[2], (3, 6) = 0, (3, 7) = conjugate(`ε`[1])*conjugate(phi(x, t)[2])*conjugate(lambda[2]), (3, 8) = conjugate(`ε`[2])*conjugate(phi(x, t)[2])*conjugate(lambda[2]), (4, 1) = 0, (4, 2) = rho(x, t)[1]*lambda[1], (4, 3) = -`ε`[2]*conjugate(psi(x, t)[1])*conjugate(lambda[1]), (4, 4) = `ε`[1]*conjugate(psi(x, t)[1])*conjugate(lambda[1]), (4, 5) = 0, (4, 6) = rho(x, t)[2]*lambda[2], (4, 7) = -`ε`[2]*conjugate(psi(x, t)[2])*conjugate(lambda[2]), (4, 8) = `ε`[1]*conjugate(psi(x, t)[2])*conjugate(lambda[2])})

(13)

H116:=Matrix([[H115],[H15]]);

Matrix(8, 8, {(1, 1) = `ε`[1]*phi(x, t)[1], (1, 2) = conjugate(`ε`[2])*phi(x, t)[1], (1, 3) = conjugate(chi(x, t)[1]), (1, 4) = 0, (1, 5) = `ε`[1]*phi(x, t)[2], (1, 6) = conjugate(`ε`[2])*phi(x, t)[2], (1, 7) = conjugate(chi(x, t)[2]), (1, 8) = 0, (2, 1) = `ε`[2]*psi(x, t)[1], (2, 2) = -conjugate(`ε`[1])*psi(x, t)[1], (2, 3) = 0, (2, 4) = conjugate(rho(x, t)[1]), (2, 5) = `ε`[2]*psi(x, t)[2], (2, 6) = -conjugate(`ε`[1])*psi(x, t)[2], (2, 7) = 0, (2, 8) = conjugate(rho(x, t)[2]), (3, 1) = -chi(x, t)[1], (3, 2) = 0, (3, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[1]), (3, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[1]), (3, 5) = -chi(x, t)[2], (3, 6) = 0, (3, 7) = conjugate(`ε`[1])*conjugate(phi(x, t)[2]), (3, 8) = conjugate(`ε`[2])*conjugate(phi(x, t)[2]), (4, 1) = 0, (4, 2) = rho(x, t)[1], (4, 3) = -`ε`[2]*conjugate(psi(x, t)[1]), (4, 4) = `ε`[1]*conjugate(psi(x, t)[1]), (4, 5) = 0, (4, 6) = rho(x, t)[2], (4, 7) = -`ε`[2]*conjugate(psi(x, t)[2]), (4, 8) = `ε`[1]*conjugate(psi(x, t)[2]), (5, 1) = `ε`[1]*phi(x, t)[1]*lambda[1], (5, 2) = conjugate(`ε`[2])*phi(x, t)[1]*lambda[1], (5, 3) = conjugate(chi(x, t)[1])*conjugate(lambda[1]), (5, 4) = 0, (5, 5) = `ε`[1]*phi(x, t)[2]*lambda[2], (5, 6) = conjugate(`ε`[2])*phi(x, t)[2]*lambda[2], (5, 7) = conjugate(chi(x, t)[2])*conjugate(lambda[2]), (5, 8) = 0, (6, 1) = `ε`[2]*psi(x, t)[1]*lambda[1], (6, 2) = -conjugate(`ε`[1])*psi(x, t)[1]*lambda[1], (6, 3) = 0, (6, 4) = conjugate(rho(x, t)[1])*conjugate(lambda[1]), (6, 5) = `ε`[2]*psi(x, t)[2]*lambda[2], (6, 6) = -conjugate(`ε`[1])*psi(x, t)[2]*lambda[2], (6, 7) = 0, (6, 8) = conjugate(rho(x, t)[2])*conjugate(lambda[2]), (7, 1) = -chi(x, t)[1]*lambda[1], (7, 2) = 0, (7, 3) = conjugate(`ε`[1])*conjugate(phi(x, t)[1])*conjugate(lambda[1]), (7, 4) = conjugate(`ε`[2])*conjugate(phi(x, t)[1])*conjugate(lambda[1]), (7, 5) = -chi(x, t)[2]*lambda[2], (7, 6) = 0, (7, 7) = conjugate(`ε`[1])*conjugate(phi(x, t)[2])*conjugate(lambda[2]), (7, 8) = conjugate(`ε`[2])*conjugate(phi(x, t)[2])*conjugate(lambda[2]), (8, 1) = 0, (8, 2) = rho(x, t)[1]*lambda[1], (8, 3) = -`ε`[2]*conjugate(psi(x, t)[1])*conjugate(lambda[1]), (8, 4) = `ε`[1]*conjugate(psi(x, t)[1])*conjugate(lambda[1]), (8, 5) = 0, (8, 6) = rho(x, t)[2]*lambda[2], (8, 7) = -`ε`[2]*conjugate(psi(x, t)[2])*conjugate(lambda[2]), (8, 8) = `ε`[1]*conjugate(psi(x, t)[2])*conjugate(lambda[2])})

(14)

NULLH16:=Matrix([H13,H14]);

Matrix(%id = 36893490284340821276)

(15)

Hnew := Matrix([[H116[1 .. 6, () .. ()]], [H16[1, () .. ()]], [H116[8, () .. ()]]])

Matrix(%id = 36893490284313909236)

(16)

``

NULL

 

NULL


 

Download matrixop-1.mw

A is the name of the vector.

A[1]:=5

 

In you other equation. use A[1]....  C[1]... not a[1]... c[1]...

There are two basic ways to do this. 1st extend a list. This is highly ineffecient when the list grows long as Maple creats copies of the list.

 The better way is to use a programmable Array( ) as opposed to Array[ ]

I have shown both is the attached.
 

restart

NULL

This is an example as I do not know how you achieved you results. There are two basic ways.

NULL

L := [1, 2]

[1, 2]

(1)

[op(L), 6]

[1, 2, 6]

(2)

L := []

[]

(3)

``

for i to 10 do L := [op(L), i^2] end do

[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]

(4)

L

[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]

(5)

A := Array()

Array(%id = 36893491269490332364)

(6)

"for i to 10 do  A(i):=i^(2);  end do"

Array(%id = 36893491269490332364)

(7)

 

A

Array(%id = 36893491269490332364)

(8)

NULL


 

Download 27-3-22_A_add_to_Array_or_List.mw

Edit:- @max125 correctly pointed out I missed the minus sign in front of the x^2. I posted the revised answer in the reply to him.

Look at this and see if that is what you want.

restart

with(RealDomain)

[Im, Re, `^`, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc, csch, eval, exp, expand, limit, ln, log, sec, sech, signum, simplify, sin, sinh, solve, sqrt, surd, tan, tanh]

(1)

f := proc (x) options operator, arrow; 6-sqrt(x^2+8*x+9) end proc

proc (x) options operator, arrow; 6-RealDomain:-sqrt(RealDomain:-`^`(x, 2)+8*x+9) end proc

(2)

g := unapply(diff(f(x), x), x)

proc (x) options operator, arrow; -(1/2)*(2*x+8)/(x^2+8*x+9)^(1/2) end proc

(3)

plot([f(x), g(x)])

 

rts := solve(f(x))

-4+43^(1/2), -4-43^(1/2)

(4)

evalf(%)

2.557438524, -10.55743852

(5)

l1 := int(f(x), x = 0 .. rts[1])

-18-(7/2)*ln(7)+3*43^(1/2)+(7/2)*ln(43^(1/2)+6)

(6)

evalf(%)

3.717726254

(7)

L := l1-(int(f(x), x = rts[1] .. k)) = 10

-18-(7/2)*ln(7)+3*43^(1/2)+(7/2)*ln(43^(1/2)+6)-(int(6-(x^2+8*x+9)^(1/2), x = -4+43^(1/2) .. k)) = 10

(8)

l2 := `assuming`([int(f(x), x = rts[1] .. k)], [k > rts[1]])

24-3*43^(1/2)-(7/2)*ln(43^(1/2)+6)+6*k-(1/2)*(k^2+8*k+9)^(1/2)*k-2*(k^2+8*k+9)^(1/2)+(7/2)*ln(k+4+(k^2+8*k+9)^(1/2))

(9)

k := fsolve(l1-l2 = 10, k)

5.988384673

(10)

l2

22.24613803-3*43^(1/2)-(7/2)*ln(43^(1/2)+6)

(11)

evalf(%)

-6.282273744

(12)

evalf(l1-l2)

10.00000000

(13)

NULL

Download 23-3-22_A_integration.mw

 If you are using windows

Always with this programs like Maple I install them using the hidden administrator account in windows. i learn't this the hard way using the Solidworks CAD systtem. 

When I first used Maple in 2012 I forgot to do the above and had all sorts of problems until I reinstalled as above. 

Might help.

f-0.001-g #gives the intersection curve.

there ae=re two basic ways to show it implicitplot or in 3D intersectplot.


 

NULL

with(plots)

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(1)

restart

NULL

f := -.497068470024476*x^3*y^4-6.70447066551140*x^5*y^3-4.75254543704658*x^5*y^2+29.2165392673953*x^5*y^4+19.7458656447309*x^5*y^6-34.1911496490261*x^5*y^5+1.01958235276613*x^5*y^8-6.20249607007329*x^5*y^7+.122625097102966*x^3*y^5-.557878506354632*x^4*y+1.10377462803280*10^(-9)*y^9-3.01639944258456*10^(-8)*y^8+2.70433066580774*10^(-7)*y^7-58.9547371078715*x^6*y^4+70.6881059337016*x^6*y^5-41.4723627878841*x^6*y^6+13.2184205014647*x^6*y^7+1.88972684858187*x^5*y-2.20596265158541*x^6*y^8+0.415520691947419e-1*x*y-0.264590704119876e-1*x^9*y^9-0.118773599704818e-5*y^6+0.290568461642441e-5*y^5-0.409894118008625e-5*y^4+0.324884379509192e-5*y^3+11.9305450198352*x^6*y^3+10.8462050916126*x^6*y^2-4.10654876148122*x^6*y+2.54724280276503*x^7*y^8-14.9818956625447*x^7*y^7+46.0951349392065*x^7*y^6-0.109255815129257e-2*x^9+0.788567804811102e-2*x^3*y^8-0.131109942751000e-5*y^2+0.249200320311903e-4*x^2+0.514872391346379e-2*x^8-0.100662629994939e-1*x^7+0.105239075112828e-1*x^6-0.630639949679202e-2*x^5-0.375713420739403e-3*x^3+0.214317754102793e-2*x^4+.876088098407044*x^9*y-2.70457990868458*x^9*y^2+.273231436604042*x^9*y^3+6.75578062548269*x^9*y^4-9.57907483795682*x^9*y^5+6.09218732418035*x^9*y^6+.722761182584203*x^3*y^3-.466894994882040*x^3*y^2+.101139100881401*x^3*y-.223464159932998*x^4*y^8+1.35561916171540*x^4*y^7-4.28474908826935*x^4*y^6+7.29078271720222*x^4*y^5-5.90416839043862*x^4*y^4+.791654444114778*x^4*y^3+1.52828070029702*x^4*y^2+.364411288643973*x^9*y^8-76.7100686748060*x^7*y^5-3.35171664262170*x^8*y+9.91733485134206*x^8*y^2-0.148435770331285e-1*x^2*y-.276512584364289*x^2*y^3+.104481013510196*x^2*y^2-.279034248189274*x^2*y^5+.370033041604670*x^2*y^4+0.399016415926658e-2*x^2*y^8-0.307519757322687e-1*x^2*y^7+.122644475629609*x^2*y^6-0.261755569520174e-2*x*y^3-0.956445131268424e-2*x*y^2-0.525240272678308e-2*x*y^6+0.294149187341931e-1*x*y^5-0.364419367372761e-1*x*y^4-0.690607476536226e-1*x^5*y^9+0.151457171844930e-1*x^4*y^9+0.671188193729842e-3*x*y^8-0.156037383968479e-2*x*y^7+.108086167003366*x^8*y^9-.178621376287247*x^7*y^9-0.705741073722833e-3*x^3*y^9+.151841215581478*x^6*y^9+2.06864668194457*10^(-7)*x+2.06863293440197*10^(-7)*y-0.199666299235104e-3*x^2*y^9-0.673706850700663e-4*x*y^9+2.00727312663099*x^8*y^3-32.1473826670758*x^8*y^4+42.6266489705831*x^8*y^5-26.3247561285797*x^8*y^6+8.73691621490782*x^8*y^7-2.06514882458964*x^9*y^7+0.363726776841009e-1*x^3*y^6-0.317849887375473e-1*x^3*y^7-1.51380636269074*x^8*y^8+5.14796137189361*x^7*y-14.4626792261666*x^7*y^2-8.76022418809059*x^7*y^3+61.1998773291695*x^7*y^4-1.79614673481709*10^(-9)-0.1e-2

0.2068646682e-6*x+0.2068632934e-6*y-0.1000001796e-2-.557878506354632*x^4*y+1.52828070029702*x^4*y^2+.791654444114778*x^4*y^3-5.90416839043862*x^4*y^4+7.29078271720222*x^4*y^5-4.28474908826935*x^4*y^6+1.35561916171540*x^4*y^7-.223464159932998*x^4*y^8+.101139100881401*x^3*y-.466894994882040*x^3*y^2+.722761182584203*x^3*y^3-.497068470024476*x^3*y^4+.122625097102966*x^3*y^5+0.363726776841009e-1*x^3*y^6-0.317849887375473e-1*x^3*y^7+0.788567804811102e-2*x^3*y^8+.876088098407044*x^9*y-2.70457990868458*x^9*y^2+.273231436604042*x^9*y^3+6.75578062548269*x^9*y^4-9.57907483795682*x^9*y^5+6.09218732418035*x^9*y^6-2.06514882458964*x^9*y^7+.364411288643973*x^9*y^8-3.35171664262170*x^8*y+9.91733485134206*x^8*y^2+2.00727312663099*x^8*y^3-32.1473826670758*x^8*y^4+42.6266489705831*x^8*y^5-26.3247561285797*x^8*y^6+8.73691621490782*x^8*y^7-1.51380636269074*x^8*y^8+5.14796137189361*x^7*y-14.4626792261666*x^7*y^2-8.76022418809059*x^7*y^3+61.1998773291695*x^7*y^4-76.7100686748060*x^7*y^5+46.0951349392065*x^7*y^6-14.9818956625447*x^7*y^7+2.54724280276503*x^7*y^8-4.10654876148122*x^6*y+11.9305450198352*x^6*y^3+10.8462050916126*x^6*y^2-58.9547371078715*x^6*y^4+70.6881059337016*x^6*y^5-41.4723627878841*x^6*y^6+13.2184205014647*x^6*y^7-2.20596265158541*x^6*y^8+0.415520691947419e-1*x*y+1.88972684858187*x^5*y-0.264590704119876e-1*x^9*y^9-4.75254543704658*x^5*y^2+29.2165392673953*x^5*y^4-6.70447066551140*x^5*y^3-34.1911496490261*x^5*y^5-6.20249607007329*x^5*y^7+19.7458656447309*x^5*y^6+1.01958235276613*x^5*y^8+.104481013510196*x^2*y^2-0.148435770331285e-1*x^2*y+.370033041604670*x^2*y^4-.276512584364289*x^2*y^3+.122644475629609*x^2*y^6-.279034248189274*x^2*y^5+0.399016415926658e-2*x^2*y^8-0.307519757322687e-1*x^2*y^7-0.261755569520174e-2*x*y^3-0.956445131268424e-2*x*y^2-0.525240272678308e-2*x*y^6+0.294149187341931e-1*x*y^5-0.364419367372761e-1*x*y^4+0.151457171844930e-1*x^4*y^9+0.671188193729842e-3*x*y^8-0.156037383968479e-2*x*y^7+.151841215581478*x^6*y^9-0.690607476536226e-1*x^5*y^9-0.199666299235104e-3*x^2*y^9-0.673706850700663e-4*x*y^9+.108086167003366*x^8*y^9-.178621376287247*x^7*y^9-0.705741073722833e-3*x^3*y^9-0.109255815129257e-2*x^9-0.409894118008625e-5*y^4+0.324884379509192e-5*y^3+0.290568461642441e-5*y^5+0.2704330666e-6*y^7-0.118773599704818e-5*y^6-0.3016399443e-7*y^8-0.630639949679202e-2*x^5+0.214317754102793e-2*x^4+0.105239075112828e-1*x^6-0.131109942751000e-5*y^2-0.100662629994939e-1*x^7-0.375713420739403e-3*x^3+0.514872391346379e-2*x^8+0.249200320311903e-4*x^2+0.1103774628e-8*y^9

(2)

g := 0.486130607155690e-1*x^8*y^9-0.793915710864734e-1*x^7*y^9+.166316351180282*x^9*y^2+0.100163106986489e-1*x^9*y-0.725705040036393e-1*x^5*y+9.99632884281232*10^(-10)-14.7626936165794*x^6*y^6-0.257557973826478e-3*x^3*y^9-5.72759908720050*10^(-8)*y^2+0.662263463130918e-1*x^6*y^9-0.292171279505531e-1*x^5*y^9+0.608295954591597e-2*x^4*y^9-0.128182657077761e-3*x*y^8+0.942633285021959e-3*x*y^7-0.350081319685295e-2*x*y^6+0.688776508883605e-2*x*y^5-0.759510525544657e-2*x*y^4+0.779592933988801e-2*x*y^3-0.157071356900974e-2*x*y^2+0.120360948207261e-2*x^2*y^8-0.763275503500010e-2*x^2*y^7+0.261578297444302e-1*x^2*y^6-0.525360371999116e-1*x^2*y^5+0.625949969717321e-1*x^2*y^4-0.425238644768537e-1*x^2*y^3-3.86106645787476*10^(-10)*x-3.85902759075275*10^(-10)*y-0.790340436745485e-4*x^2*y^9+0.686404280878835e-5*x*y^9+1.61849630014731*10^(-9)*y^9-2.09189804289573*10^(-8)*y^8+1.12047595681372*10^(-7)*y^7+0.206051274192785e-2*x^6-0.653096669907143e-4*x^3-14.1011477616247*x^8*y^4+16.1206664094461*x^8*y^5+24.3848818418075*x^6*y^5-0.119825252833206e-1*x^9*y^9-0.194739348540728e-1*x*y-22.5326440659846*x^6*y^4-10.1171356900718*x^8*y^6+3.54607571091852*x^8*y^7+24.8991084141403*x^7*y^4+0.108822319123503e-2*x^8-0.204991873524550e-2*x^7-0.130932246100715e-1*x^3*y^2+0.366339579352754e-2*x^3*y^8-0.205724334437174e-1*x^3*y^7+1.18133952115280*x^5*y^2-5.37560745909542*x^5*y^3-11.4126688531743*x^5*y^5+10.8065136845075*x^5*y^4+17.0670410168283*x^7*y^6+6.78593938914942*x^5*y^6-5.90525014814763*x^7*y^7+1.07208303147736*x^7*y^8+.109044949802749*x^6*y-2.20370941827329*x^6*y^2+0.111947605945080e-1*x^3*y+10.7889789185019*x^6*y^3+.159056987714934*x^9*y^8+5.03727993859085*x^6*y^7-2.40269859450631*x^4*y^4+1.20635516320513*x^4*y^3-.265458418460343*x^4*y^2+0.150663088709287e-1*x^4*y-1.31283787245192*x^9*y^3-.903861947690635*x^6*y^8-0.239122454967206e-3*x^9-0.165983942264791e-2*x^3*y^3-3.21279186038477*10^(-7)*y^6+0.540484515816569e-1*x^3*y^4-0.842888013414850e-1*x^3*y^5+0.579687010994481e-1*x^3*y^6-27.6818094812177*x^7*y^5-2.28138893951844*x^5*y^7-0.192976732163787e-2*x^2*y+.403933247361425*x^5*y^8+0.147245143634235e-1*x^2*y^2+2.59098767602453*10^(-7)*y^3-.858862881780697*x^9*y^7+2.42075981205875*x^9*y^6-0.308703623001616e-2*x^8*y-.961875822502716*x^8*y^2+2.50971144938558*x^4*y^5-1.47470431176274*x^4*y^6+.489488747286588*x^4*y^7-0.854522394871459e-1*x^4*y^8+0.386516741572877e-3*x^4+0.431899528468855e-5*x^2+5.31031847990512*10^(-7)*y^5-0.118522142744809e-2*x^5-3.79079342069720*x^9*y^5+3.22173828058960*x^9*y^4-5.05713571671948*10^(-7)*y^4+6.10514710675470*x^8*y^3+2.08327870192822*x^7*y^2-0.610537804766400e-1*x^7*y-.650514845456873*x^8*y^8-11.3732791811746*x^7*y^3

-0.3861066458e-9*x-0.3859027591e-9*y+0.150663088709287e-1*x^4*y-.265458418460343*x^4*y^2+1.20635516320513*x^4*y^3-2.40269859450631*x^4*y^4+2.50971144938558*x^4*y^5-1.47470431176274*x^4*y^6+.489488747286588*x^4*y^7-0.854522394871459e-1*x^4*y^8+0.111947605945080e-1*x^3*y-0.130932246100715e-1*x^3*y^2-0.165983942264791e-2*x^3*y^3+0.540484515816569e-1*x^3*y^4-0.842888013414850e-1*x^3*y^5+0.579687010994481e-1*x^3*y^6-0.205724334437174e-1*x^3*y^7+0.366339579352754e-2*x^3*y^8+0.100163106986489e-1*x^9*y+.166316351180282*x^9*y^2-1.31283787245192*x^9*y^3+3.22173828058960*x^9*y^4-3.79079342069720*x^9*y^5+2.42075981205875*x^9*y^6-.858862881780697*x^9*y^7+.159056987714934*x^9*y^8-0.308703623001616e-2*x^8*y-.961875822502716*x^8*y^2+6.10514710675470*x^8*y^3-14.1011477616247*x^8*y^4+16.1206664094461*x^8*y^5-10.1171356900718*x^8*y^6+3.54607571091852*x^8*y^7-.650514845456873*x^8*y^8-0.610537804766400e-1*x^7*y+2.08327870192822*x^7*y^2-11.3732791811746*x^7*y^3+24.8991084141403*x^7*y^4-27.6818094812177*x^7*y^5+17.0670410168283*x^7*y^6-5.90525014814763*x^7*y^7+1.07208303147736*x^7*y^8+.109044949802749*x^6*y+10.7889789185019*x^6*y^3-2.20370941827329*x^6*y^2-22.5326440659846*x^6*y^4+24.3848818418075*x^6*y^5-14.7626936165794*x^6*y^6+5.03727993859085*x^6*y^7-.903861947690635*x^6*y^8-0.194739348540728e-1*x*y-0.725705040036393e-1*x^5*y-0.119825252833206e-1*x^9*y^9+1.18133952115280*x^5*y^2+10.8065136845075*x^5*y^4-5.37560745909542*x^5*y^3-11.4126688531743*x^5*y^5-2.28138893951844*x^5*y^7+6.78593938914942*x^5*y^6+.403933247361425*x^5*y^8+0.147245143634235e-1*x^2*y^2-0.192976732163787e-2*x^2*y+0.625949969717321e-1*x^2*y^4-0.425238644768537e-1*x^2*y^3+0.261578297444302e-1*x^2*y^6-0.525360371999116e-1*x^2*y^5+0.120360948207261e-2*x^2*y^8-0.763275503500010e-2*x^2*y^7+0.779592933988801e-2*x*y^3-0.157071356900974e-2*x*y^2-0.350081319685295e-2*x*y^6+0.688776508883605e-2*x*y^5-0.759510525544657e-2*x*y^4+0.608295954591597e-2*x^4*y^9-0.128182657077761e-3*x*y^8+0.942633285021959e-3*x*y^7+0.662263463130918e-1*x^6*y^9-0.292171279505531e-1*x^5*y^9-0.790340436745485e-4*x^2*y^9+0.686404280878835e-5*x*y^9+0.486130607155690e-1*x^8*y^9-0.793915710864734e-1*x^7*y^9-0.257557973826478e-3*x^3*y^9-0.239122454967206e-3*x^9-0.5057135717e-6*y^4+0.2590987676e-6*y^3+0.5310318480e-6*y^5+0.1120475957e-6*y^7-0.3212791860e-6*y^6-0.2091898043e-7*y^8-0.118522142744809e-2*x^5+0.386516741572877e-3*x^4+0.206051274192785e-2*x^6-0.5727599087e-7*y^2-0.204991873524550e-2*x^7-0.653096669907143e-4*x^3+0.108822319123503e-2*x^8+0.431899528468855e-5*x^2+0.1618496300e-8*y^9+0.9996328843e-9

(3)

P1 := plots:-display(plot3d(f-0.1e-2, x = 0 .. 1, y = 0 .. 2, color = red, style = surface), plot3d(g, x = 0 .. 1, y = 0 .. 2, color = green, style = wireframe))

 

fg := simplify(f-0.1e-2-g)

(HFloat(0.8660717876999807)*y-HFloat(2.870896259999945)*y^2+HFloat(1.5860693089999662)*y^3+HFloat(3.5340423439999995)*y^4-HFloat(5.788281417)*y^5+HFloat(3.671427512)*y^6-HFloat(1.2062859430000001)*y^7+HFloat(0.20535430090000004)*y^8-0.1447654513e-1*y^9-HFloat(8.534356959999808e-4))*x^9+(-HFloat(3.3486296069999995)*y+HFloat(10.879210669999999)*y^2-HFloat(4.097873979999998)*y^3-HFloat(18.04623491)*y^4+HFloat(26.505982559999996)*y^5-HFloat(16.20762044)*y^6+HFloat(5.190840504)*y^7-HFloat(0.8632915174999999)*y^8+0.5947310628e-1*y^9+HFloat(0.004060500722000001))*x^8+(HFloat(5.209015151999995)*y-HFloat(16.54595792999999)*y^2+HFloat(2.613054992000008)*y^3+HFloat(36.30076891999998)*y^4-HFloat(49.02825919)*y^5+HFloat(29.028093920000003)*y^6-HFloat(9.076645512)*y^7+HFloat(1.475159772)*y^8-0.9922980521e-1*y^9-HFloat(0.008016344264999992))*x^7+(-HFloat(4.215593710999997)*y+HFloat(1.1415660999999866)*y^3+HFloat(13.049914509999999)*y^2-HFloat(36.42209304000001)*y^4+HFloat(46.303224090000015)*y^5-HFloat(26.70966917)*y^6+HFloat(8.181140561000001)*y^7-HFloat(1.3021007040000003)*y^8+0.8561486929e-1*y^9+HFloat(0.008463394767999994))*x^6+(HFloat(1.9622973529999983)*y-HFloat(5.9338849579999975)*y^2+HFloat(18.410025589999996)*y^4-HFloat(1.3288632069999955)*y^3-HFloat(22.778480799999997)*y^5-HFloat(3.92110713)*y^7+HFloat(12.95992625)*y^6+HFloat(0.6156491056)*y^8-0.3984361970e-1*y^9-HFloat(0.005121178069999996))*x^5+(-HFloat(0.5729448153000001)*y+HFloat(1.7937391179999997)*y^2-HFloat(0.4147007189000007)*y^3-HFloat(3.5014697949999984)*y^4+HFloat(4.781071268)*y^5-HFloat(2.8100447759999994)*y^6+HFloat(0.8661304146999997)*y^7-HFloat(0.1380119204)*y^8+0.9062757634e-2*y^9+HFloat(0.0017566607989999996))*x^4+(HFloat(0.08994434031000005)*y-HFloat(0.4538017703000001)*y^2+HFloat(0.7244210220000001)*y^3-HFloat(0.5511169216)*y^4+HFloat(0.2069138984)*y^5-HFloat(0.021596023419999985)*y^6-HFloat(0.011212555300000001)*y^7+HFloat(0.004222282254000001)*y^8-0.4481830999e-3*y^9-HFloat(3.1040375370000004e-4))*x^3+(HFloat(0.08975649913999999)*y^2-HFloat(0.01291380970999996)*y+HFloat(0.3074380445999999)*y^4-HFloat(0.23398871989999998)*y^3+HFloat(0.09648664585999998)*y^6-HFloat(0.22649821099999995)*y^5+HFloat(0.0027865546769999996)*y^8-HFloat(0.023119220699999995)*y^7-0.1206322555e-3*y^9+HFloat(2.060103673999994e-5))*x^2+(HFloat(0.06102600403999991)*y-HFloat(0.010413485039999991)*y^3-HFloat(0.007993737744000015)*y^2-HFloat(0.001751589530000003)*y^6+HFloat(0.02252715363999998)*y^5-HFloat(0.028846831479999953)*y^4+HFloat(7.993708507999997e-4)*y^8-HFloat(0.002503007124999997)*y^7-0.7423472788e-4*y^9+HFloat(2.072507747999997e-7))*x-HFloat(0.002000002796195685)-HFloat(3.5932276091581405e-6)*y^4+HFloat(2.989745027101643e-6)*y^3+HFloat(2.3746527682378423e-6)*y^5+HFloat(1.5838547089901542e-7)*y^7-HFloat(8.664568110100262e-7)*y^6-HFloat(9.245014000011583e-9)*y^8-HFloat(1.2538234244762572e-6)*y^2-0.514721672e-9*y^9+HFloat(2.0724919623361815e-7)*y

(4)

P2 := plots:-implicitplot(fg, x = 0 .. 1, y = 0 .. 2)

 

``

P3 := plots:-intersectplot(f-0.1e-2, g, x = 0 .. 1, y = 0 .. 2, colour = black, thickness = 5)

 

plots:-display(P1, P3)

 

NULL


 

Download 22-02-2022_contact.mw

This is a something I did a few years ago. I have crudely edited it to suit. 

restartNULL

with(plots)

with(ColorTools)

Clrs := GetPalette("Patchwork")

Color(Clrs[4])

NULL

``

"f(x):=x^(3)-1 ;    frts:=[fsolve(f(x),x,complex)];  R1:=plot([Re,Im]~(frts), style=point, color=black, symbol=solidcircle, symbolsize=20, scaling=constrained) ; "

NULL

g := unapply(diff(f(x), x), x)

rts := frts

nops(rts)

Listx := Vector(); Listy := Vector(); C := Array(datatype = float[8])
 

 
xa := 2*min(`~`[Re](rts)); xb := 1.251*max(`~`[Re](rts)); ya := 1.25*min(`~`[Im](rts)); yb := 1.25*max(`~`[Im](rts)); incriment := 401

``

Newton := proc (XA := -2, XB := 2, YA := -2, YB := 2, INC := 400) local x1, xn, `&epsilon;`, j, x, y, itter, err; global rts; j := 1; for x from XA by (XB-XA)/INC to XB do for y from YA by (YB-YA)/INC to YB do Listx(j) := x; Listy(j) := y; `&epsilon;` := 1; x1 := x+0.1e-6+I*y; itter := 0; while 0.5e-2 < `&epsilon;` and itter < 25 do xn := evalhf(x1-f(x1)/g(x1)); err := xn-x1; `&epsilon;` := abs(err); x1 := xn; itter := itter+1 end do; C(j) := min(min[index](`~`[abs]([seq(rts[j]-x1, j = 1 .. nops(rts))]))/nops(rts), 1.0); j := j+1 end do end do end proc

````

``

````

NULLNewton(xa, xb, ya, yb, incriment)

p2 := plots:-pointplot(Listx, Listy, symbol = point, symbolsize = 1, color = COLOR(HUE, C), size = [incriment, incriment])

display(p2, R1)``

Download 14-2-22_Newton_complex.mw

1 2 3 4 5 Page 1 of 5