1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Simplying linear equation to get quartic in q using Maple

  1. Jul 10, 2014 #1

    wel

    User Avatar
    Gold Member

    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: Jul 10, 2014
  2. jcsd
  3. Jul 10, 2014 #2

    donpacino

    User Avatar
    Gold Member

    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
     
  4. Jul 10, 2014 #3

    wel

    User Avatar
    Gold Member

    multiply both numerator and denominator by λb∗γ∗q∗PQ+kp∗λr∗(1−q)2 in both sides?
     
  5. Jul 10, 2014 #4

    The Electrician

    User Avatar
    Gold Member

    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.
     

    Attached Files:

  6. Jul 10, 2014 #5

    wel

    User Avatar
    Gold Member

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

    donpacino

    User Avatar
    Gold Member

    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.
     
  8. Jul 10, 2014 #7

    wel

    User Avatar
    Gold Member

    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: Jul 10, 2014
  9. Jul 10, 2014 #8

    wel

    User Avatar
    Gold Member

    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.
     
  10. Jul 10, 2014 #9

    The Electrician

    User Avatar
    Gold Member

    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.
     

    Attached Files:

  11. Jul 12, 2014 #10

    wel

    User Avatar
    Gold Member

    Thank you very much the Electrician.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Simplying linear equation to get quartic in q using Maple
  1. Linear Equations (Replies: 21)

Loading...