Message Boards Message Boards

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

Using the listed results for a following calculations

Hello, 
I have an equation and it is generetion a list of x values for a given Q. I would like to use those x values for a following calculation such as I would like to muliply them with some constant values. Can you guide me how to do that? Also I am would like to Plot the results Q versus x after calculation. 
If you know a simpler way of solveing the equation I would like to hear that as well. 

Here is the equation

Thank you in advance.
 Table[Grid[Table[FindRoot[
     1.4712199999999998` Log[
         0.3080613378622851` + 1.4517158853306498` y*Q/x] +
       5.52759` Log[
         3.2461067881456693` +
          1.4517158853306498` y*Q/x] - (1.4712199999999998` Log[
           0.3080613378622851` + 1.4517158853306498` 0] +
         5.52759` Log[3.2461067881456693` + 1.4517158853306498` 0])
      == (3.88212` Log[
         1.` + 0.04908626625087394` (1 - y)*
           Q/(1 - x)]) - (3.88212` Log[1.` + 0.04908626625087394` 0]),
    {x, .999}], {Q, 0.05, 1, 0.05}]], {y, {0.15}}]
POSTED BY: Timur Islamoglu
Posted 11 years ago
Using Grid you are "desktop publishing" your result which makes it nice to look at and pretty close to impossible to use for further calculations. Try this instead.
 In[1]:= allx = Table[Table[x/.FindRoot[1.4712199999999998` Log[0.3080613378622851` + 1.4517158853306498` y*Q/x]+
       5.52759` Log[3.2461067881456693` + 1.4517158853306498` y*Q/x] - (1.4712199999999998` Log[
       0.3080613378622851` + 1.4517158853306498` 0] + 5.52759` Log[3.2461067881456693` +
       1.4517158853306498` 0]) == (3.88212` Log[1.` + 0.04908626625087394` (1 - y)*Q/(1 - x)]) - (3.88212` Log[
       1.` + 0.04908626625087394` 0]), {x, .999}], {Q, 0.05, 1, 0.05}], {y, {0.15}}]
 
 Out[1]= {
 {0.89657, 0.896151, 0.895753, 0.895373, 0.895011, 0.894666, 0.894337, 0.894024, 0.893725, 0.893439,
  0.893167, 0.892907, 0.892659, 0.892422, 0.892197, 0.891981, 0.891776, 0.89158, 0.891393, 0.891214}}
That isn't as pretty to look at but now all your results are in the list allx and you can subscript them to extract single values, multiply allx by 3 to multiply all of them by 3, etc.

Notice that little x/. inserted in front of the FindRoot. That is substituting how FindRoot returns information about a root with just the value of the root it finds.
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