willmoss

20 Reputation

One Badge

8 years, 360 days

MaplePrimes Activity


These are questions asked by willmoss

Already searched and browsed multiple different threads and still cannot find a solution.

Apologizing the noob nature of this question.

 

 

In this code below, Why is the factor command not working?

f := a^2+x^2-2*ax;

a^2+x^2-2*ax

(1)

factor(f);

a^2+x^2-2*ax

(2)

expand((x-a)*(x-a));

a^2-2*a*x+x^2

(3)

``

NULL

NULL


Download factor_polynomial_2_multivariable.mwfactor_polynomial_2_multivariable.mw

 

Simple test of GaussianElimination function

Why doesn't this work? 

Also can I just confirm that for GaussianElimination (according to the help this uses LUDecomposition function with the output=['U'] option) the input is the augmented matrix of the system, the coefficient matrix augmented with the RHS)

In a separate test I got an example working using this code, but I've never seen this syntax before for A Matrix (using << it seems?)

 

Thank you for your help.

 

 

ORIGINAL ATTEMPT

with(LinearAlgebra):

A := matrix(3, 3, [-3, 2, 1, 1, -2, 1, 1, 2, -3]);

Matrix(3, 3, {(1, 1) = -3, (1, 2) = 2, (1, 3) = 1, (2, 1) = 1, (2, 2) = -2, (2, 3) = 1, (3, 1) = 1, (3, 2) = 2, (3, 3) = -3})

(1)

GaussianElimination(A)

Error, (in LinearAlgebra:-GaussianElimination) invalid input: LinearAlgebra:-GaussianElimination expects its 1st argument, A, to be of type Matrix() but received A

 

``

 

Download gauss_elimination_2.mw

Trying to solve this IVP of the SHO  (second order linear costant-coefficient).

Everything works fine until I come to the solving even after using dsolve with initial conditions (even using the differential operator D in the initial conditions)  , the answer still contains _C1, an unknown constant.

The full worksheet is below.  The code for dsolve is:

sol3 := dsolve(subs(par1, {de1, D(x)*0 = 0, x(0) = 1}), x(t));

 

Hoping you can help with a solution.

 

 

 

 

Page 1 of 1