Simplying linear equation to get quartic in q using Maple

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
9 replies · 4K views
wel
Gold Member
Messages
36
Reaction score
0
Using the maple I am trying to get quardic in q from this big linear equation. Then use Descarte’s rule of signs to determine the number of positive roots.
\begin{equation}
\frac{\gamma*q*P_Q}{k_p*(1-q)*P_C} = \frac{I*\alpha}{k_f+k_d+\frac{k_n*\lambda_b*\gamma*q*P_Q}{\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2}+k_p*(1-q)}
\end{equation}
Values of parameters are given below:
I=1200
k_f = 6.7*10.^7
k_d = 6.03*10.^8
k_n = 2.92*10.^9
k_p = 4.94*10.^9
[itex]\alpha = 1.14437*10.^(-3)[/itex]
[itex]\lambda_b = 0.87e-2[/itex]
[itex]\lambda_r = 835[/itex]
[itex]\gamma = 2.74[/itex]
P_C = 3*10.^(11)
P_Q = 2.87*10.^(10)

=>
I tried the code in maple to get quartic in q but does not works. II := 1200:
k_f := 6.7*10.^7:
k_d := 6.03*10.^8:
k_n := 2.92*10.^9:
k_p := 4.94*10.^9:
alpha := 1.14437*10.^(-3):
lambda_b := 0.87e-2:
lambda_r := 835:
ggamma := 2.74:
P_C := 3*10.^11:
P_Q := 2.87*10.^10:

eq := ggamma*q*P_Q/(k_p*(1-q)*P_C) = II*alpha/(k_f+k_d+k_n*lambda_b*ggamma*q*P_Q/(lambda_b*ggamma*q*P_Q+k_p*lambda_r*(1-q)^2)+k_p*(1-q)):

simply(eq, q);My lecturer want me to manipulate the equation and get a quartic in q before substituting the values of parameters into the equation. After that,use Descarte’s rule of signs to determine the number of positive roots. Then write Q=1-q to get second quartic in Q and repeat rule of signs to determine number of steady states of q less than 1. And do the substition of parameters if necessary.
Now, its kind of hard for me what he wants because to get quartic in q first from the equation is hard to do by hand , so i have to use in maple which is not working then use Descarte’s rule of signs.
 
Last edited:
Physics news on Phys.org
first get the equation in the form of

[itex]\frac{A_{1}*q^{1}+A_{2}*q^{2}+...A_{n}*q^{n} }{ B{1}*q^{1}+B_{2}*q^{2}+...B_{n}*q^{n} }[/itex]

to do this, simply multiple both the numerator and denominator by λb∗γ∗q∗PQ+kp∗λr∗(1−q)2
 
donpacino said:
first get the equation in the form of

[itex]\frac{A_{1}*q^{1}+A_{2}*q^{2}+...A_{n}*q^{n} }{ B{1}*q^{1}+B_{2}*q^{2}+...B_{n}*q^{n} }[/itex]

to do this, simply multiple both the numerator and denominator by λb∗γ∗q∗PQ+kp∗λr∗(1−q)2

multiply both numerator and denominator by λb∗γ∗q∗PQ+kp∗λr∗(1−q)2 in both sides?
 
I'm not familiar with Maple, but in Mathematica there are two commands useful for this sort of thing.

Apart[] performs a partial fraction decomposition.

Together[] combines terms into a single fraction.

Maple no doubt has similar commands.

Here's what I get by combining terms:

attachment.php?attachmentid=71191&stc=1&d=1405018742.png


Now you can collect powers in the numerator and denominator to get the form suggested by donpacino.
 

Attachments

  • Quar.png
    Quar.png
    26.6 KB · Views: 574
  • Like
Likes   Reactions: 1 person
If i divide top and bottom by [itex]{\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2}[/itex] then i get:

\begin{equation}
\frac{\gamma*q*P_Q}{k_p*(1-q)*P_C} = \frac{(I*\alpha)(\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2)} {(k_f+k_d+k_p*(1-q))(\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2)+k_n*\lambda_b*\gamma*q*P_Q}
\end{equation}
and then doing cross multiplying gives

\begin{equation}
[(k_f+k_d+k_p*(1-q))(\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2)+k_n*\lambda_b*\gamma*q*P_Q]*(\gamma*q*P_Q) = (I*\alpha)(\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2)(k_p*(1-q)*P_C)
\end{equation}
now i guess from there maple can help me to simple the expression to get quartic in q but maple is not simplying it.
 
Last edited:
wel said:
multiply both numerator and denominator by λb∗γ∗q∗PQ+kp∗λr∗(1−q)2 in both sides?

This issue is already corrected by The electrician's post...

that being said, multiplying both he numerator and denominator by λb∗γ∗q∗PQ+kp∗λr∗(1−q)2 would only get you a signal denominator for the right side of the equation. you would then have to find a common denominator between the two sides. While this could be done by hand, it would be tedious. It would be easier to do it as seen in the electrician's post.
 
The Electrician said:
I'm not familiar with Maple, but in Mathematica there are two commands useful for this sort of thing.

Apart[] performs a partial fraction decomposition.

Together[] combines terms into a single fraction.

Maple no doubt has similar commands.

Here's what I get by combining terms:

attachment.php?attachmentid=71191&stc=1&d=1405018742.png


Now you can collect powers in the numerator and denominator to get the form suggested by donpacino.

I don't have Mathematica and not familiar with it. Could you please try with this equation in Mathematic and tell me what you get.
\begin{equation}
[(k_f+k_d+k_p*(1-q))(\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2)+k_n*\lambda_b*\gamma*q*P_Q]*(\gamma*q*P_Q) - (I*\alpha)(\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2)(k_p*(1-q)*P_C)=0
\end{equation}
 
Last edited:
From the Electrician answer,
His final answer must equal to zero. then the denominator will goes off and i only have to collect the powers in the numerator bit.
 
wel said:
I don't have Mathematica and not familiar with it. Could you please try with this equation in Mathematic and tell me what you get.
\begin{equation}
[(k_f+k_d+k_p*(1-q))(\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2)+k_n*\lambda_b*\gamma*q*P_Q]*(\gamma*q*P_Q) - (I*\alpha)(\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2)(k_p*(1-q)*P_C)=0
\end{equation}

Here's what I get if I expand the left side and then collect powers of q:

attachment.php?attachmentid=71192&stc=1&d=1405029863.png


I notice that in my earlier posts, I used two different symbols Pq and PQ for the same thing. Taking that into account, this result is the same as my previous result for the numerator.

Surely Maple has an "Expand" command.
 

Attachments

  • Quar2.png
    Quar2.png
    21.4 KB · Views: 589
Thank you very much the Electrician.