# Problem in expressing the whole one equation in terms of one variable

Posted 9 years ago
6896 Views
|
5 Replies
|
0 Total Likes
|
 Hi. I am trying to express the whole one equation in terms of one variable "e" using mathematica "solve" function but I have two errors regarding this which are the following:  Syntax::bktmcp: Expression "(Subscript[RVsum, t-2dt]+((Subscript[u, t-dt]+\[Epsilon])*RO Subscript[A, t-dt]\[Minus]Subscript[u, t\[Minus]2dt]*R O Subscript[A, t\[Minus]2dt])^2+((Subscript[u, t]*RO Subscript[A, t]\[Minus](Subscript[u, t-dt]+\[Epsilon])*RO Subscript[A, t-dt])^2)" has no closing ")". Syntax::sntxi: Incomplete expression; more input is needed. Here, I may understand the second error message but for my first error message, I think I am perfectly fine with the numbers of opening and closing brackets and this can also be confirmed with my equation when I include or exclude brackets and see whether they are in yellow or red for warning. However, I am still trying to solve all of these two errors and trying to get the expression of this function in terms of one variable. Since the code is in Mathematica format and it is too long to describe, I attached this mathematica code file to this question post. I would appreciate if someone can help me with this quite desparate and urgent problem..Thank you very much in advance. Attachments:
5 Replies
Sort By:
Posted 9 years ago
Posted 9 years ago
 I didn't run the code and so don't have an output to share. Of course the expression may not be analytically solvable for epsilon. Looking at your expression, it appears to be the difference between the ratios of two quadratic expressions in epsilon. So it is likely to be a quartic equation when expanded out. The solution to the general quartic polynomial is quite a mess, and the coefficients of the terms in the original quartic are very messy--so your final result will be a very large expression. Perhaps you want to take a different approach to whatever use you are planning to make for this?
Posted 9 years ago
 I see by looking at the internals of your notebook that you are using Mathematica version 7. So, I believe that syntax highlighting may not have been a feature back at version 7. I have checked your notebook using my approach in both version 8, 9 and 10 (I no longer have version 7 on hand) and confirm that my analysis is probably right. I am attaching a notebook with the syntax highlighted brackets removed. This may not be what you desired in terms of the expression grouping so you will have to check. I did this in Version 8. I also fixed an odd syntax problem involving a subtraction--this may have been due to invisible characters, I am not sure. See the attached notebook Attachments:
Posted 9 years ago
 Your code has a mixture of StandardForm and TraditionalForm content mixed together. Because of this the syntax highlighting is not showing the bracket mismatches. Click on the cell bracket of the cell with your Solve function to select that cell. Then click on the menu item Format>ClearFormatting to remove the mixture of formatting. When you do this you will see where there are unmatched parentheses (they will be colored pink) and then you can figure out where to add or remove parentheses to produce the expression that you need to work with. I hope this helps. --David
Posted 9 years ago
 I do really appreciate your help. However, even though I followed your steps, still nothing changed with my error messages..I could not identify any colored brackets at all but the errors remained the same..In addition, I re-edited the error message again since the contents I uploaded before seemed to be a mistakenly cut-off version of the first error, but the contents remains the same...