Message Boards Message Boards

GROUPS:

[?] Solve cubic equation w.r.t X ?

Posted 7 months ago
1023 Views
|
5 Replies
|
0 Total Likes
|

Hi,

I have partially differentiated an equation w.r.t. x, see picture below, and want to isolate x in the equation to solve for a local maximum. This equation is part of my master's thesis and quite crucial. I know that, if rewritten, it will be cubic in x, thus, there can be at least three different solutions. However, at this moment, I am not able to obtain any solutions using Mathematica. Can you help me?

Attached there is a picture of the equation as it looks in the paper and also a picture of how I've written it into Mathematica.

Ideally, I would like to simplify it and find values of x that solves the equation.

I hope you can help.

Equation to be solved for x. Mathematica Code

5 Replies
Posted 7 months ago

Hi Mads,

Please post code, not images.

One obvious problem is that solve should be Solve. Functions in WL are case sensitive and all built-in functions start with a capital letter.

Posted 7 months ago

Sorry for the inconvenience. Please find my code below.

Ideally, I would like the expression on a cubic form, if Wolfram can provide it, and then isolate x in the expression. x is the only variable, the others are constants.

Solve[[Alpha](ph - pl)(R1 + R2[Gamma][Lambda]*( { {x(ph)^2 + (1 - x)(pl)^2}, {xph + (1 - x)pl} } - { {x(1 - ph)ph + (1 - x)(1 - pl)pl}, {x(1 - ph) + (1 - x)(1 - pl)} }) + R2*( { {(1 - [Gamma]*[Lambda])}, {1 + r} } )) - 2b[Phi]*x == 0, x]

Did you mean this?

Solve[\[Alpha] (ph - pl) (R1 + 
      R2\[Gamma]*\[Lambda]*(((x (ph)^2 + (1 - x) (pl)^2)/(x*
              ph + (1 - x) pl)) - ((x (1 - ph) ph + (1 - x) (1 - 
                pl) pl)/(x (1 - ph) + (1 - x) (1 - pl)))) + 
      R2*((((1 - \[Gamma]*\[Lambda]))/(1 + r)))) - 2 b*\[Phi]*x == 0,
  x]
Posted 7 months ago

Thank you Gianluca!

I am new to Mathematica. The code you provided gives me three different solutions, as expected. However, the solutions are not that meaningful. Is there any way I can simplify these in some way?

and what do the grey rounded boxes with numbers mean? i.e. (--- 1 ---) etc. enter image description here

The expression is very complicated, and Mathematica gives an oultine of the structure. Click on "show more", "show all" to explore.

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