Message Boards Message Boards

[✓] Simplify expression/ Turn eq1 into eq2?

GROUPS:

How to turn eq1 into eq2? Thanks.

eq1 = (-A2 + pinf (s + \[Theta]c))/(s (s + \[Theta]c)) - (
  A1 Dc E^((lh - x) Sqrt[(s + \[Theta]c)/
    Dc]) (\[Alpha]1 Sqrt[Dp (s + \[Theta]c)] + Sqrt[
     s (s + \[Theta]c)]))/((Sqrt[s] + 
     Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
     Dp (s + \[Theta]c))) + (E^((s (lh - x))/Sqrt[
     Dp s]) (Sqrt[
        Dp] \[Alpha]1 (Dc s - Dp (s + \[Theta]c)) (-A2 + 
          pinf (s + \[Theta]c)) + 
       A1 s (Sqrt[Dc Dp] s + Sqrt[Dc Dp] \[Theta]c + 
          Dc \[Alpha]1 Sqrt[Dp (s + \[Theta]c)])))/(s (Sqrt[s] + 
       Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
       Dp (s + \[Theta]c)))

eq2 = -((A1 Dc E^((lh - x) Sqrt[(s + \[Theta]c)/Dc]))/(
   Sqrt[s + \[Theta]c] (-Dc s + Dp (s + \[Theta]c)))) + (-A2 + 
   pinf (s + \[Theta]c))/(s (s + \[Theta]c)) + 
  E^((s (lh - x))/Sqrt[
   Dp s]) ((
     A1 Sqrt[Dc Dp])/((Sqrt[s] + Sqrt[Dp] \[Alpha]1) (-Dc s + 
        Dp (s + \[Theta]c))) + (
     A1 Dc Sqrt[Dp] \[Alpha]1)/((Sqrt[s] + Sqrt[Dp] \[Alpha]1) Sqrt[
      s + \[Theta]c] (-Dc s + Dp (s + \[Theta]c))) - (
     Sqrt[Dp] \[Alpha]1 (-A2 + pinf (s + \[Theta]c)))/(
     s (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c)))
POSTED BY: Zhonghui Ou
Answer
16 days ago

Collecting the exponential comes close to your form:

Collect[eq1, E^_, Simplify]
POSTED BY: Gianluca Gorni
Answer
16 days ago

Dear Gianluca, I tried 'Collect' and 'Simplify', but the fractions in the results are not the simplest.

In[66]:= eq3 = Collect[eq1, E^_, Simplify]

Out[66]= (-A2 + pinf (s + \[Theta]c))/(s (s + \[Theta]c)) - (
 A1 Dc E^((lh - x) Sqrt[(s + \[Theta]c)/
   Dc]) (\[Alpha]1 Sqrt[Dp (s + \[Theta]c)] + Sqrt[
    s (s + \[Theta]c)]))/((Sqrt[s] + 
    Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
    Dp (s + \[Theta]c))) + (E^((s (lh - x))/Sqrt[
    Dp s]) (Sqrt[
       Dp] \[Alpha]1 (Dc s - Dp (s + \[Theta]c)) (-A2 + 
         pinf (s + \[Theta]c)) + 
      A1 s (Sqrt[Dc Dp] s + Sqrt[Dc Dp] \[Theta]c + 
         Dc \[Alpha]1 Sqrt[Dp (s + \[Theta]c)])))/(s (Sqrt[s] + 
      Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
      Dp (s + \[Theta]c)))
POSTED BY: Zhonghui Ou
Answer
15 days ago

This is even simpler:

eq4 = -((A1 Dc E^((lh - x) Sqrt[(s + \[Theta]c)/Dc]))/(Sqrt[
        s + \[Theta]c] (-Dc s + Dp (s + \[Theta]c)))) + (-A2 + 
     pinf (s + \[Theta]c))/(s (s + \[Theta]c)) + 
  E^((s (lh - x))/Sqrt[Dp s]) (
   Sqrt[Dp] ((A1 Sqrt[Dc])/(-Dc s + Dp (s + \[Theta]c)) + (
      A1 Dc \[Alpha]1)/(
      Sqrt[s + \[Theta]c] (-Dc s + 
         Dp (s + \[Theta]c))) - (\[Alpha]1 (-A2 + 
         pinf (s + \[Theta]c)))/(s (s + \[Theta]c))))/(
   Sqrt[s] + Sqrt[Dp] \[Alpha]1)
POSTED BY: Gianluca Gorni
Answer
15 days ago

Dear Gianluca, Would you like to tell me how to get the result above? Thanks.

POSTED BY: Zhonghui Ou
Answer
12 days ago

Group Abstract Group Abstract