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

Posted 1 year ago
1369 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.
5 Replies
Sort By:
Posted 1 year 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 1 year 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]
Posted 1 year ago
 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]