Message Boards Message Boards

0
|
15044 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Solve[ ] behaviour in Mathematica inconsistent with Wolfram Alpha?

Problem now solved:

While Solve[ ] still fails to return an answer, Reduce[ ] does produce sensible output, if the argument is in entered using the "Basic Math Assistant Palette".

The original question was :

The attached problem - product of three matrices with sin(x) and cos(x) elements equals a matrix with y and z elements, find x, y and z - has a solution on Wolfram Alpha. As the two non-trivial solutions include many identical terms I would like to further simplify in Mathematica. After re-entering the problem in Mathematica Solve[ ] fails. Reduce[ ] appears to give an answer, but not in a useful (readable) format. In Wolfram Alpha the problem is

solve {{cos(x),-sin(x)},{sin(x),cos(x)}} {{A,B},{C,D}} {{cos(x),sin(x)},{-sin(x),cos(x)}}={{y,0},{0,z}}

A,B,C,D are positive real numbers and B=C.

Software used is Mathematica 7 on OS X 10.10.

Question: Is it possible to get a fully simplified answer in Mathematica?

POSTED BY: Joachim Rose

If the matrices are multiplied

In[15]:= {{Cos[x], -Sin[x]}, {Sin[x], Cos[x]}} {{A, B}, {C, D}} {{Cos[x], Sin[x]}, {-Sin[x], Cos[x]}}
Out[15]= {{A Cos[x]^2, -B Sin[x]^2}, {-C Sin[x]^2, D Cos[x]^2}}

it seems evident that Reduce gives the correct, short answer (Mathematica 10.1)

In[13]:= Reduce[{{Cos[x], -Sin[x]}, {Sin[x], Cos[x]}} {{A, B}, {B, D}} {{Cos[x], Sin[x]}, {-Sin[x], Cos[x]}} == {{y, 0}, {0, z}}, {x, y, z}]
Out[13]= (B ==  0 || (C[1] \[Element] Integers && (x == 2 \[Pi] C[1] || x == \[Pi] + 2 \[Pi] C[1]))) &&
  y == A Cos[x]^2 && z == D Cos[x]^2

Solve does not miss parts of the solution

In[16]:= Solve[{{Cos[x], -Sin[x]}, {Sin[x], Cos[x]}} {{A, B}, {C,  D}} 
               {{Cos[x], Sin[x]}, {-Sin[x], Cos[x]}} == {{y, 0}, {0, z}}, {x, y, z}]

Out[16]= {{y -> A, z -> D, x -> ConditionalExpression[2 \[Pi] C[1], C[1] \[Element] Integers]}, 
          {y -> A, z -> D, x -> ConditionalExpression[\[Pi] + 2 \[Pi] C[1], C[1] \[Element] Integers]}}

as far as it presumes A, B, C, and D being unequal to zero:

In[17]:= Solve[{A Cos[x]^2 == y, -B Sin[x]^2 == 0, -C Sin[x]^2 == 0, D Cos[x]^2 == z}, {x, y, z}]
Out[17]= {{y -> A, z -> D, x -> ConditionalExpression[2 \[Pi] C[1],  C[1] \[Element] Integers]}, 
          {y -> A, z -> D, x -> ConditionalExpression[\[Pi] + 2 \[Pi] C[1], C[1] \[Element] Integers]}}
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract