Message Boards Message Boards

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

Solve returns the variable to be solved for as a dependent variable

Posted 12 years ago
I have the following code where I want to solve for lam1R, lam2R and lam3R. However, the Solve command gives me these three results as functions of lam1R, i.e. lam1R is on the right-hand side of the solutions for lam1R, lam2R and lam3R. No warning is issued. What is happening here?
Thank you,
Roman
 e1R = 1/Ah (-Sqrt[2] ky kz lam1R - Sqrt[2] kx kz lam2R -
      kx ky lam3R);
 e4R = 1/As (-Sqrt[6] kx^2 lam1R + Sqrt[6] kx ky lam2R +
      Sqrt[3] kx kz lam3R);
 e5R = 1/As (Sqrt[6] kx ky lam1R\:ffff - Sqrt[6] ky^2 lam2R +
      Sqrt[3] ky kz lam3R);
 e6R = 1/As (Sqrt[6] kx kz lam1R + Sqrt[6] ky kz lam2R -
      Sqrt[3] kz^2 lam3R);
 
finc1R =
  e1R Sqrt[2] ky kz + e2R Sqrt[3] ky kz + e3R ky kz +
   e4R Sqrt[6] kx^2 - e5R Sqrt[6] kx ky - e6R Sqrt[6] kx kz;
finc2R =
  e1R Sqrt[2] kx kz - e2R Sqrt[3] kx kz + e3R kx kz -
   e4R Sqrt[6] kx ky + e5R Sqrt[6] ky^2 - e6R Sqrt[6] ky kz;
finc3R =
  e1R kx ky - e3R Sqrt[2] kx ky - e4R Sqrt[3] kx kz -
   e5R Sqrt[3] ky kz + e6R Sqrt[3] kz^2;

sol = Solve[{finc1R == 0, finc2R == 0, finc3R == 0}, {lam1R, lam2R,
    lam3R}];
POSTED BY: Roman Groger
Posted 12 years ago
Okay, I can answer this myself. When I look at the code that I posted, there is "lam1R\:ffff" in e5R. There is presumably some extra character after lam1R which is not visible in the Mathematica notebook. This is not lam1R but some other variable that is treated as independent. In the output, the part with "\:ffff" is again not visible and thus it looks like lam1R depends on lam1R. In fact, it is that lam1R is a function of lam1R\:ffff. I have never seen this before and it is rather dangerous that Mathematica does not warn me that there is some extra character after lam1R that is treated as a part of the variable name.
POSTED BY: Roman Groger
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