Message Boards Message Boards

0
|
8596 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

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

Posted 11 years ago

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:
POSTED BY: Woo Young Kang
5 Replies

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 BY: David Reiss
Posted 11 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...

POSTED BY: Woo Young Kang

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 BY: David Reiss
Posted 11 years ago

Thank you very much for your help again! Yes, I do understand your point and it is quite well making sense. I have downloaded your file, copied and pasted into my Mathematica 7 notepad and executed. But instead, the status is in the running mode for a quite long time up to now. Does this mean that I need to upgrade my Mathematica 7 into 8 to perform this task? In addition, may I ask you for the output for this code if possible since I cannot run this with my Mathematica 7 version but I really need the output quite much..? Thank you very much, really!

POSTED BY: Woo Young Kang

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 BY: David Reiss
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