pradyvlitzen

5 Reputation

2 Badges

14 years, 210 days

MaplePrimes Activity


These are replies submitted by pradyvlitzen

I need the first case of your explanation, where I need to compute Jacobian of symbolic expressions. thank you, will start working on OpenMaple.

I need the first case of your explanation, where I need to compute Jacobian of symbolic expressions. thank you, will start working on OpenMaple.

The equations were so big hence I asked only the core part of it. Here is the complete thing I am solving.

I have a set of functions and parameters, I am computing Jacobian to those functions. I get a matrix rectangular in dimensions. So, determine Jacobian of sub-matrices(formed by removing one column for each sub-matrix) and equating them to zero.

> T := Matrix([[0], [4*t], [0]]); X := Matrix([[x1], [x2], [x3]]); R := Matrix([[1, 0, 0], [0, cos(pi*t), -sin(pi*t)], [0, sin(pi*t), cos(pi*t)]]);

> c1 := x1^2+x2^2-1/4-(1/4)*sin(l1); c2 := x3-sin(l2); c3 := t-1/2-(1/2)*sin(l3);>

W := T+R.X; P := Matrix([[W], [c1], [c2], [c3]]);>

Z := subs({l1 = z5, l2 = z6, l3 = z7, t = z4, x1 = z1, x2 = z2, x3 = z3}, P);>

Z := Transpose(Z[1 .. -1, 1]);

phi := Jacobian(Z, [z1, z2, z3, z4, z5, z6, z7])

> j1 := SubMatrix(phi, [1 .. 6], [2 .. 7]); e1 := Determinant(j1);
> j2 := Matrix([SubMatrix(phi, [1 .. 6], [1]), SubMatrix(phi, [1 .. 6], [3 .. 7])]); e2 := Determinant(j2);
> j3 := Matrix([SubMatrix(phi, [1 .. 6], [1, 2]), SubMatrix(phi, [1 .. 6], [4 .. 7])]); e3 := Determinant(j3);
> j4 := Matrix([SubMatrix(phi, [1 .. 6], [1 .. 3]), SubMatrix(phi, [1 .. 6], [5 .. 7])]); e4 := Determinant(j4);
> j5 := Matrix([SubMatrix(phi, [1 .. 6], [1 .. 4]), SubMatrix(phi, [1 .. 6], [6, 7])]); e5 := Determinant(j5);
> j6 := Matrix([SubMatrix(phi, [1 .. 6], [1 .. 5]), SubMatrix(phi, [1 .. 6], [7])]); e6 := Determinant(j6);
> j7 := SubMatrix(phi, [1 .. 6], [1 .. 6]); e7 := Determinant(j7);
> e1 := simplify(e1); e2 := simplify(e2); e3 := simplify(e3); e4 := simplify(e4); e5 := simplify(e5); e6 := simplify(e6); e7 := simplify(e7);
> eq1 := e1 = 0; eq2 := e2 = 0; eq3 := e3 = 0; eq4 := e4 = 0; eq5 := e5 = 0; eq6 := e6 = 0; eq7 := e7 = 0;

> S := Array(1 .. nops([out]));
for i to nops([out]) do S[i] := NULL; for j to nops(out[i]) do if lhs(out[i][j]) = rhs(out[i][j]) then  else S[i] := S[i], out[i][j] end if end do end do;
> print(S);

 

I am yet to complete last part of the above statements where the solutions I got in S are substituted into c1,c2,c3 which gives different implicit functions of a surface which I need to render.

The question is can we convert a procedure with above statements into a C routine, if yes, what is it.

 

Thank you,

Pradeep.

The equations were so big hence I asked only the core part of it. Here is the complete thing I am solving.

I have a set of functions and parameters, I am computing Jacobian to those functions. I get a matrix rectangular in dimensions. So, determine Jacobian of sub-matrices(formed by removing one column for each sub-matrix) and equating them to zero.

> T := Matrix([[0], [4*t], [0]]); X := Matrix([[x1], [x2], [x3]]); R := Matrix([[1, 0, 0], [0, cos(pi*t), -sin(pi*t)], [0, sin(pi*t), cos(pi*t)]]);

> c1 := x1^2+x2^2-1/4-(1/4)*sin(l1); c2 := x3-sin(l2); c3 := t-1/2-(1/2)*sin(l3);>

W := T+R.X; P := Matrix([[W], [c1], [c2], [c3]]);>

Z := subs({l1 = z5, l2 = z6, l3 = z7, t = z4, x1 = z1, x2 = z2, x3 = z3}, P);>

Z := Transpose(Z[1 .. -1, 1]);

phi := Jacobian(Z, [z1, z2, z3, z4, z5, z6, z7])

> j1 := SubMatrix(phi, [1 .. 6], [2 .. 7]); e1 := Determinant(j1);
> j2 := Matrix([SubMatrix(phi, [1 .. 6], [1]), SubMatrix(phi, [1 .. 6], [3 .. 7])]); e2 := Determinant(j2);
> j3 := Matrix([SubMatrix(phi, [1 .. 6], [1, 2]), SubMatrix(phi, [1 .. 6], [4 .. 7])]); e3 := Determinant(j3);
> j4 := Matrix([SubMatrix(phi, [1 .. 6], [1 .. 3]), SubMatrix(phi, [1 .. 6], [5 .. 7])]); e4 := Determinant(j4);
> j5 := Matrix([SubMatrix(phi, [1 .. 6], [1 .. 4]), SubMatrix(phi, [1 .. 6], [6, 7])]); e5 := Determinant(j5);
> j6 := Matrix([SubMatrix(phi, [1 .. 6], [1 .. 5]), SubMatrix(phi, [1 .. 6], [7])]); e6 := Determinant(j6);
> j7 := SubMatrix(phi, [1 .. 6], [1 .. 6]); e7 := Determinant(j7);
> e1 := simplify(e1); e2 := simplify(e2); e3 := simplify(e3); e4 := simplify(e4); e5 := simplify(e5); e6 := simplify(e6); e7 := simplify(e7);
> eq1 := e1 = 0; eq2 := e2 = 0; eq3 := e3 = 0; eq4 := e4 = 0; eq5 := e5 = 0; eq6 := e6 = 0; eq7 := e7 = 0;

> S := Array(1 .. nops([out]));
for i to nops([out]) do S[i] := NULL; for j to nops(out[i]) do if lhs(out[i][j]) = rhs(out[i][j]) then  else S[i] := S[i], out[i][j] end if end do end do;
> print(S);

 

I am yet to complete last part of the above statements where the solutions I got in S are substituted into c1,c2,c3 which gives different implicit functions of a surface which I need to render.

The question is can we convert a procedure with above statements into a C routine, if yes, what is it.

 

Thank you,

Pradeep.

Thanks once again.

Thanks once again.

Page 1 of 1