Message Boards Message Boards

0
|
4539 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

simplify a long symbolic expression (sum of fractions)

Posted 10 years ago

Hello all, I am having a long complicated symbolic expression which is sum of fractions and complex in nature. Now I want to separate its real and imaginary parts and later solve these two parts (treating them two algebraic equations) for two unknowns. Mathematica is giving me one unknown in terms of second unknown (which is not expected). I think that I am unable to put original expression in simplified form. Please help me. Also by any mean can I translate the original expression into such a form so that it can be processed in Maple.

thanks in advance.

POSTED BY: ver din
4 Replies
Posted 10 years ago

Thank you for the copy of the file. That went surprisingly smothly.

I am very glad I didn't try guess what kind of random file to show you.

For anyone who doesn't want to download the 52kbyte .rar compressed file which uncompresses to 20 mbytes, here is a sample of the head:

Element[{AV1, p, R, Rdot, \[Eta], etadot, \[Omega]},    Reals];

(0.` + 0.5` I) E^(I \[Eta]) etadot R + 0.5` E^(I \[Eta]) Rdot + (0.0005333333333` ((0.` + 0.5` I) E^(I \[Eta]) etadot R + 
         0.5` E^(I \[Eta])Rdot))/(-0.0005333333333` - (0.` + 1.` I) \[Omega])^2 + ((1.1001145919006453`*^9 + 0.` I) E^(
         I \[Eta])p^4 R^3)/(((0.` - 0.0168942561` I) + 1.` \[Omega])^2 (-240.45040853881275` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)^2) + ((0.` + 2.0311153906021673` I) AV1 E^(
         I \[Eta])p^2 R)/(((0.` - 0.0168942561` I) + 1.` \[Omega]) (-240.45040853881275` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)) - ((0.` + 1.2413088241018356`*^11 I) E^(
         I \[Eta])p^7 R^3)/(((0.` - 0.00844712805` I) + 1.` \[Omega]) ((0.` + 0.0168942561` I) + 
           1.` \[Omega]) ((0.` - 121.63299354640638` I) p + 1.` \[Omega]) (-240.45040853881278` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)^2 (-240.45040853881275` p^2 + (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)) + ((8.817433435400575`*^10 + 0.` I) E^(
         I \[Eta])p^6 R^3 \[Omega])/(((0.` - 0.00844712805` I) + 1.` \[Omega]) ((0.` + 0.0168942561` I) + 
           1.` \[Omega]) ((0.` - 121.63299354640638` I) p + 1.` \[Omega]) (-240.45040853881278` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)^2 (-240.45040853881275` p^2 + (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)) - ((0.` + 0.000010335972278911555` I) E^(
         I \[Eta])p^5 R^3 \[Omega]^2)/(((0.` - 0.00844712805` I) + 1.` \[Omega]) ((0.` + 0.0168942561` I) + 
           1.` \[Omega]) ((0.` - 121.63299354640638` I) p + 1.` \[Omega]) (-240.45040853881278` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)^2 (-240.45040853881275` p^2 + (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)) + ((7.3419882135610845`*^-6 + 0.` I) E^(
         I \[Eta])p^4 R^3 \[Omega]^3)/(((0.` - 0.00844712805` I) + 1.` \[Omega]) ((0.` + 0.0168942561` I) + 
           1.` \[Omega]) ((0.` - 121.63299354640638` I) p + 1.` \[Omega]) (-240.45040853881278` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)^2 (-240.45040853881275` p^2 + (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)) - ((0.` + 2.1516064511128958`*^-22 I) E^(
         I \[Eta])p^3 R^3 \[Omega]^4)/(((0.` - 0.00844712805` I) + 1.` \[Omega]) ((0.` + 0.0168942561` I) + 
           1.` \[Omega]) ((0.` - 121.63299354640638` I) p + 1.` \[Omega]) (-240.45040853881278` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)^2 (-240.45040853881275` p^2 + (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)) + ((1.5283583177291376`*^-22 + 0.` I) E^(
         I \[Eta])p^2 R^3 \[Omega]^5)/(((0.` - 0.00844712805` I) + 1.` \[Omega]) ((0.` + 0.0168942561` I) + 
           1.` \[Omega]) ((0.` - 121.63299354640638` I) p + 1.` \[Omega]) (-240.45040853881278` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)^2 (-240.45040853881275` p^2 + (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)) - ((0.` + 280.70399796437727` I) E^(I \[Eta])
          p^6 R^3)/(((0.` - 0.0168942561` I) + 1.` \[Omega])^2 ((0.` + 0.0168942561` I) + 
           1.` \[Omega]) (-240.45040853881275` p^2 - (0.` + 244.26598709281276` I) p \[Omega] + 
           1.` \[Omega]^2)^2 (-240.45040853881275` p^2 + (0.` + 244.26598709281276` I) p \[Omega] + 
           1.` \[Omega]^2)) - ((2.2002291838012905`*^9 + 0.` I) E^(I \[Eta])p^4 R^3)/(((0.` - 0.0168942561` I) + 
           1.` \[Omega]) ((0.` + 0.0168942561` I) + 1.` \[Omega]) (-240.45040853881275` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2) (-240.45040853881275` p^2 + (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2)) - ((0.` + 3.610871796487759`*^8 I) E^(
         I \[Eta])p^10 R^3)/(((0.` - 0.0168942561` I) + 1.` \[Omega]) (-240.45040853881275` p^2 - (0.` + 
              244.26598709281276` I) p \[Omega] + 1.` \[Omega]^2) (1.` p^4 + 
           1.0236710118812482` p^2 \[Omega]^2 + 0.000017296130818865636` \[Omega]^4)^2)

The rest of the twenty megabytes looks about the same as this.

ComplexExpand[Re[expression]] looks like it will probably roughly quadruple the size of the expression, octuple if you count the real and imaginary parts. Before and after is a forest of numerators and denominators of powers of powers of terms. There are a lot of identical denominators, but they are not all the same. For my little fragment Simplify was able to reduce the size by about a third and do that relatively quickly. But that is stacking up powers of variables even higher than they were originally and doesn't look promising when done with twenty megabytes and then hoping to equate terms and come up with the desired solution.

Hummm... The ability of rar to get a 400 fold compression ratio on the file says there is a stunning degree of repetition in that expression. If it were possible to get even 100 fold reduction in the size of that expression with Mathematica doing some delicate manipulation to take advantage of the repetition, but without putting the problem into a nearly insoluble form, then that might help dramatically. It might be interesting to see what the result of a Together done on each subset of the sum which shared a common denominator would be.

POSTED BY: Bill Simpson
Posted 10 years ago

Thanks Bill. Please find the attached notebook in rar file (since the size of notebook file is greater than 20 Mb). To open the attached file you have to rename the file with extension ".rar" (means rename the file with "complex_prob1.nb.rar" and then extract). Since I was not able to upload the .rar file hence I had to take that move. Please bear with me.

Now I want to solve the real and imaginary parts of Eq1 for Rdot and etadot.

Thanks in advance.

Attachments:
POSTED BY: ver din

A start might be

ComplexExpand[Re[ expression]] 

where

In[1]:= ?ComplexExpand
ComplexExpand[expr] expands expr assuming that all variables are real. ComplexExpand[expr, {x1, x2, …}]
      expands expr assuming that variables matching any of the x  are complex.
POSTED BY: Bruce Miller
Posted 10 years ago

If you edit your posting and attach your notebook as a file containing your long complicated symbolic expression then someone can probably show how to do this. Otherwise there is far too much uncertainty that someone will guess what you expression looks like and give you a solution to a different problem.

Please include any additional information you might have about the, like the domains of the two variables, any assumptions about the range of the variables, etc. That will sometimes help when solving such problems.

Thank you

POSTED BY: Bill Simpson
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