Klausklabauter

22 Reputation

3 Badges

6 years, 313 days

MaplePrimes Activity


These are questions asked by Klausklabauter

Hello

The calculation of the jacobian matrix is not working.

https://de.maplesoft.com/support/help/maple/view.aspx?path=VectorCalculus/Jacobian

Testes on windows, mac. worhksheet and document mode.

Maple 2017.

 

 

 

with(VectorCalculus)

[`&x`, `*`, `+`, `-`, `.`, `<,>`, `<|>`, About, AddCoordinates, ArcLength, BasisFormat, Binormal, ConvertVector, CrossProduct, Curl, Curvature, D, Del, DirectionalDiff, Divergence, DotProduct, Flux, GetCoordinateParameters, GetCoordinates, GetNames, GetPVDescription, GetRootPoint, GetSpace, Gradient, Hessian, IsPositionVector, IsRootedVector, IsVectorField, Jacobian, Laplacian, LineInt, MapToBasis, Nabla, Norm, Normalize, PathInt, PlotPositionVector, PlotVector, PositionVector, PrincipalNormal, RadiusOfCurvature, RootedVector, ScalarPotential, SetCoordinateParameters, SetCoordinates, SpaceCurve, SurfaceInt, TNBFrame, TangentLine, TangentPlane, TangentVector, Torsion, Vector, VectorField, VectorPotential, VectorSpace, Wronskian, diff, eval, evalVF, int, limit, series]

(1)

Jacobian([rcos(t), rsin(t), r2t], [r, t])

Matrix(%id = 18446744078361292662)

(2)

``


 

Download DAROTIERTJACOBIANIMGRABSCHEISSEMA.mw

Hello

we have a matrix A (s.p.d) and b where LDL^t=A is the cholesky decompositon.

Why is the commands output

LUDecomposition(A, method = 'Cholesky', output = ['L', 'U']);

different from the output described in books or wikipedia.

To be exact:

L, the lower triangular matrix, is not normalized (the diagonal entries should be 1, they are not!)
L^t (upper triangular matrix) too.
D is not available for Cholesky at all.

 

If we calculate it with GaussianElimination

LUDecomposition(A, output = ['L', 'U'])

L is the wanted normalized lower triangular matrix, but its not normalized with cholesky.

And the DIAGONAL enntries are the wanted diagonal matrix D with cholesky.

 

This output is very confusing. Please can someone explain how to use/get the correct decomposition?

A example worksheet is attached.

Thank you :)!


 

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)

b := `<,>`(1, 2, 2)

Vector[column](%id = 18446744078207759414)

(2)

A := Matrix(3, 3, {(1, 1) = 4, (1, 2) = 6, (1, 3) = 2, (2, 1) = 6, (2, 2) = 10, (2, 3) = 8, (3, 1) = 2, (3, 2) = 8, (3, 3) = 30})

Matrix(%id = 18446744078207760614)

(3)

LUDecomposition(A, method = 'Cholesky', output = ['L', 'U'])

Matrix(%id = 18446744078207732662), Matrix(%id = 18446744078207732422)

(4)

LUDecomposition(A, output = ['L', 'U'])

Matrix(%id = 18446744078207771822), Matrix(%id = 18446744078207772062)

(5)

``


 

Download dasfindetnichtmalpeterlustig.mw

 

dasfindetnichtmalpeterlustig.mw

 

Hello

I have a question respective to the display of calculated numbers.

Is there a way to display the "correct" value of a calculated float or absurd fraction?

I tried it with evalf(), convert(rational) but without success.

 

To be concrete I calculate the Given Rotation matrices of

A := Matrix(3, 3, [[-3, 32/5, 4], [4, 24/5, 3], [5, 6*sqrt(2), 5*sqrt(2)]])

G := Matrix(3, 3, [[-3/5, 4/5, 0], [-4/5, -3/5, 0], [0, 0, 1]])

which results in the followin (correct) matrix

Matrix(3, 3, {(1, 1) = 5, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = -8, (2, 3) = -5, (3, 1) = 5, (3, 2) = 6*2^(1/2), (3, 3) = 5*2^(1/2)})

 

But using the method

Given1 := GivensRotationMatrix(A[1], 1, 2);

I get following weird approximated matrix

Matrix(3, 3, [[-(15/1249)*sqrt(1249), (32/1249)*sqrt(1249), 0], [-(32/1249)*sqrt(1249), -(15/1249)*sqrt(1249), 0], [0, 0, 1]])

Just look at the the cell a11 which should be -3/5 but with GivensRotationmatrix() I get this totaly

weird fraction -15*sqrt(1249)*(1/1249). I tried simpliefed, evalf, convert(ration) but never get the result of -3/5.

Maybe someone can help me? :)

 

EDIT

Writing maple code in this editor is a pain in the ass.

Isnt "Maple Math" wortking?!

Page 1 of 1