Ronan

125 Reputation

6 Badges

5 years, 192 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are answers submitted by Ronan

The Determinant to the Equations = 0 so the system cant be solved. Maybe you have an error.
 

restart

``

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]

(1)

``

eq1 := x[1]-x[2] = 0;

x[1]-x[2] = 0

(2)

eq2 := -x[1]+2*x[2]-x[3] = 0;

-x[1]+2*x[2]-x[3] = 0

(3)

eq3 := -x[2]+2*x[3]-x[4] = 0;

-x[2]+2*x[3]-x[4] = 0

(4)

eq4 := -x[3]+x[4]-t = 0;

-x[3]+x[4]-t = 0

(5)

M, v := GenerateMatrix({eq1, eq2, eq3, eq4}, [x[1], x[2], x[3], x[4]])

Matrix(%id = 18446744074805789630), Vector[column](%id = 18446744074805789510)

(6)

LinearSolve(M, v)

Error, (in LinearAlgebra:-LinearSolve) inconsistent system

 

LinearAlgebra:-Rank(M)

4

(7)

GaussianElimination(M)

Matrix(%id = 18446744074805811910)

(8)

LinearAlgebra:-Determinant(M)

0

(9)

``


 

Download Eqns-1.mw


This Is how I would approach the issue. Could be a problem if l=1 or n.

restart

``

C := (sum(A[k]*x[i, k], k = 1 .. l-1)+sum(A[k]*x[i, k], k = l+1 .. n)+A[l]*x[i, l])^2-(2*(sum(A[k]*x[i, k], k = 1 .. l-1)+sum(A[k]*x[i, k], k = l+1 .. n)+A[l]*x[i, l]))*y[i]+y[i]^2

(sum(A[k]*x[i, k], k = 1 .. l-1)+sum(A[k]*x[i, k], k = l+1 .. n)+A[l]*x[i, l])^2-2*(sum(A[k]*x[i, k], k = 1 .. l-1)+sum(A[k]*x[i, k], k = l+1 .. n)+A[l]*x[i, l])*y[i]+y[i]^2

(1)

diff(C, A[l])

2*(sum(A[k]*x[i, k], k = 1 .. l-1)+sum(A[k]*x[i, k], k = l+1 .. n)+A[l]*x[i, l])*x[i, l]-2*x[i, l]*y[i]

(2)

``


Download diff_sum.mw

 

 

.Replace in solve({.....................},{c__1,c__3,c__4,x}) and it works

 


You haven't defined "p", you have "ep" so I assumed that to be e*p. You also have defined "del" so I changed that to 1 just to see what would happen. Could be totally wrong but it solves easily then.

``

restart

e := 5

5

(1)

f := 0.714e-1

0.714e-1

(2)

p := 0.815e-1

0.815e-1

(3)

q := .397

.397

(4)

Sol := solve({(-n+(p*q/((1+f*n)^2+(1+T-n)^2))^2)/(e*p) = 0, -T+p*(1+e*f*n)/((1+f*n)^2+(1+T-n)^2) = 0}, [T, n])

[[T = 0.3919624923e-1, n = 0.2421000982e-3], [T = -.9371446226-.8116256169*I, n = 0.6704759545e-1+.2196973222*I], [T = -2.934201781+3.533684884*I, n = -1.734513872+2.660302975*I], [T = -3.532762021+1.455618087*I, n = -2.704556354+2.261007132*I], [T = -3.532762021-1.455618087*I, n = -2.704556354-2.261007132*I], [T = -2.934201781-3.533684884*I, n = -1.734513872-2.660302975*I], [T = -.9371446226+.8116256169*I, n = 0.6704759545e-1-.2196973222*I]]

(5)

nops(Sol)

7

(6)

for i to nops(Sol) do Sol[i] end do

[T = 0.3919624923e-1, n = 0.2421000982e-3]

 

[T = -.9371446226-.8116256169*I, n = 0.6704759545e-1+.2196973222*I]

 

[T = -2.934201781+3.533684884*I, n = -1.734513872+2.660302975*I]

 

[T = -3.532762021+1.455618087*I, n = -2.704556354+2.261007132*I]

 

[T = -3.532762021-1.455618087*I, n = -2.704556354-2.261007132*I]

 

[T = -2.934201781-3.533684884*I, n = -1.734513872-2.660302975*I]

 

[T = -.9371446226+.8116256169*I, n = 0.6704759545e-1-.2196973222*I]

(7)

``

``


Download maple-1.mw

 


This might help you. It was posted as an answer to my animation question many months ago. I found it extremly helpful.

http://www.mapleprimes.com/posts/136156-Example-Of-Animation

 

 

Use Rank it is in the LinearAlgebra Package.

Rank(A) returns a value of   5

Hope this helps.

 

 

1st. Maple 16.02 is compatible with Win8

2nd Have you tried installing it in Win7 compatibility mode? Would be interesting to know if this works but even if it does install I doubt you would get any level of support on crashes etc.

 

Try this http://books.google.co.uk/books?id=PK_N9aFZ3ccC&pg=PA473&lpg=PA473&dq=sylvester+dialytic+elimination+method&source=bl&ots=abVGdGz59G&sig=t6X2FTndHDS1rr2YKyEWJc2c3Gk&hl=en&sa=X&ei=XtB5UOmfHqmL0AXYn4HwBQ&ved=0CB4Q6AEwAA#v=onepage&q=sylvester%20dialytic%20elimination%20method&f=false

its part of a google book. It is what gave me the basic understanding.

The google search I used was sylvester dialytic elimination method

and the google book is Robot Analysis: The mechanics of serial and parallel Manipulators-

Hope the helps.

I do hope others reply to the original question. would polynomial ideals , grobner basis by useful here and if how to use them.

 

These 2 equations can be solved using the Sylvester Maxtrx technique. Have annotated the worhsheet to try and explain.

Would be interesting to see other techniques for solving them.
 

restart

with(LinearAlgebra)

 

eq1 := (1/4)*p*g*A*B+(1/2)*g^2*A*B*h-(7/12)*p*g*A*h+(5/6)*A^2*h^2+(13/12)*A^2*h-(1/3)*p*A^2+(5/12)*g*A-(3/2)*g^2*A-(1/4)*p*A^2*h*c*g^2+(1/4)*p*g*A*d*h-(1/12)*p*g^2+(3/2)*A^3*h^3+(1/4)*p*A^2*h^2*d+(1/4)*p*A^2*h^2*B+(1/4)*p*A^2*h*B+(1/4)*A^2*h*c*g^2-(1/4)*p*A*c*g^3-(1/4)*g*A*B*h+(1/4)*g*A*d*h+(1/3)*A^2-(13/12)*p*A^2*h+(1/4)*p*g*A*B*h-(5/12)*p*g*A-(1/4)*g*A*B-(1/2)*g^2*A*B+(1/4)*A*c*g^3-(5/6)*p*A^2*h^2+(7/12)*g*A*h-(1/4)*A^2*h^2*d-(1/4)*A^2*h*B+(1/2)*g^2*A*B+(1/12)*g^2+(1/2)*g*A^2*h^2-(1/2)*g^4*A*c-2*g*A^2*h+(1/2)*A*d*h-(1/4)*A^2*h^2*B

NULL

NULL

eq2 := -(5/6)*A*c*g*h^3*B*d-4*h^3*c*g*A-(11/3)*c^2*g^4*h-9*A*c*g*h^2+7*h*B*c*g^2-6*A*c*g*h+(10/3)*c^2*g^4*h*B+(1/6)*h^2*B^4-(10/3)*c^2*g^3*h^2*A+(7/6)*B^2*h^3*d+3*B*c*g^2-A*c*g-2*h^2*c*g^2-(7/6)*d^2*h+(7/3)*B^2*h^3*d+(29/12)*d^2*h^3*B-h^4*c*A^2-c*A^2*h^2-B*h^3*d+(3/2)*c*d*g^2-B^2*c*g^2-3*d*h*B-3*d*h^2*B+(1/6)*B^3*h^2*d+(7/6)*d*B^2*h+(29/12)*d^2*h^2*B-4*h*c*g^2-(5/6)*B^2*h^3*A*c*g-(1/6)*B^2*c*g^2*d*h^2-(5/6)*B^2*h^2*A*c*g+(5/6)*B*c^2*g^3*A*h^2-(23/4)*d*h^2*B*c*g^2+(14/3)*d*h^3*A*c*g-(59/12)*d*h*B*c*g^2+(19/6)*d*h^2*A*c*g+(7/2)*B*A*c*g*h+(17/2)*B*A*c*g*h^2+5*B*h^3*A*c*g+(1/12)*B^4*h+(5/4)*d^3*h^3-(3/2)*c^3*g^6+(1/12)*h^3*B^4-(7/6)*h^3*d^2-(7/3)*d^2*h^2-B*d-2*c*g^2-4*c^2*g^4+(1/2)*d*h^4*c*A^2+(1/2)*B*h^4*c*A^2+(1/2)*B*h^3*c*A^2+(5/6)*A^2*c^2*g^2*h^3-(1/6)*B^3*c*g^2*h^2+(1/12)*h*c^2*g^4*B^2-(1/6)*B^3*c*g^2*h+(17/4)*d*h*c^2*g^4-4*d^2*h^2*c*g^2+(31/6)*d*h^2*c*g^2-(9/2)*c^2*g^3*A*h+(17/3)*d*h*c*g^2+4*B*h^2*c*g^2-(17/6)*h*B^2*c*g^2-(11/6)*B^2*h^2*c*g^2+(5/2)*c^2*g^4*B+(1/12)*d^2*h^3*B^2+(1/6)*B^3*h^3*d-2*c*A^2*h^3

NULL

NULL

Sylvesterg := SylvesterMatrix(eq1, eq2, h);

PolySylg := sort(LinearAlgebra:-Determinant(Sylvesterg), g);

``

Alternatively a Polynomial in h can be made

 

NULL

You need Numerical values for A,B,c,d,p to solve the polynomial

Then back substitute the roots into one of the equations to get the corresponding values of g or h.

 

Test Values

A := 3/2; 1; B := 6/5; 1; c := 9/7; 1; d := 4/3; -1; p := 1/2

Digits := 20;

sort(PolySylg, g)

G := [fsolve(PolySylg, g)];

NULL

Back Substitution

NULL

for i to nops(G) do g := G[i]; H1[i] := fsolve(eq1, h) end do

 

for i to nops(G) do g := G[i]; H2[i] := fsolve(eq2, h) end do

NULL


Download 2_non-linear_equatio.mw

I would suggest you contact your supplier. I purchased a home use license of maple 15 early march and got a free upgrade to maple 16 when it was released. I just purchesed the home user license for maple 16 last week. I suppose by the time maple 17 and sim 7 are released I will need to pay something to get an upgrade.

Thank you all for replys and comments. I did get assign to work. there was a duplicate entry ie 2 rows the same which caused the problem. To clarify a some of the ponts raised. The rows are dependant on the previous rows. I choose a matrix because in a previous post Iwas told lists can be inefficant. Also athe matrix is visually easy to read I find. What I posed was just a short made up example. Thr algsubs on the equations is to shorten them as the can go on for screenful after screenfull. At the end of the assembling the equations I end uo with a 4x4 matrix whose determinant multiplies out to a 20th order polynomial. It is at this point I am using the assign to the valuse saved in the store matrix. I shall experiment with the

"#If you prefer assignment then you can use the two elementwise operations assign~ and  =~  : assign~(store[..,1]=~store[..,2]): a1,CX3,S1; "

At present I am using a for i to 100 do loop.

Page 1 of 1