# Simplying linear equation to get quartic in q using Maple

1. Jul 10, 2014

### wel

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.

\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)}

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
$\alpha = 1.14437*10.^(-3)$
$\lambda_b = 0.87e-2$
$\lambda_r = 835$
$\gamma = 2.74$
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: Jul 10, 2014
2. Jul 10, 2014

### donpacino

first get the equation in the form of

$\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} }$

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

3. Jul 10, 2014

### wel

multiply both numerator and denominator by λb∗γ∗q∗PQ+kp∗λr∗(1−q)2 in both sides?

4. Jul 10, 2014

### The Electrician

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:

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

#### Attached Files:

• ###### Quar.png
File size:
33.3 KB
Views:
80
5. Jul 10, 2014

### wel

If i divide top and bottom by ${\lambda_b* \gamma *q*P_Q+k_p*\lambda_r*(1-q)^2}$ then i get:

\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}

and then doing cross multiplying gives

[(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)

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: Jul 10, 2014
6. Jul 10, 2014

### donpacino

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.

7. Jul 10, 2014

### wel

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.

[(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

Last edited: Jul 10, 2014
8. Jul 10, 2014

### wel

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.

9. Jul 10, 2014

### The Electrician

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

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.

#### Attached Files:

• ###### Quar2.png
File size:
28.2 KB
Views:
64
10. Jul 12, 2014

### wel

Thank you very much the Electrician.