Message Boards Message Boards

Simplify a complicated solution by a simpler way?

GROUPS:

eq50 has given a complicated solution, and it should be simplified into the sum of several proper-fraction-alike parts. I can get a simpler one in eq55, but it takes 5 abstruse steps and isn't the simplest yet. Can you give a easy and straight way?

In[159]:= eq12 = (cinf \[Theta]c \[Lambda])/(s + \[Theta]c) - (
   E^((lh - x) /Sqrt[Dc ] Sqrt[s + \[Theta]c]) F1 Sqrt[
    Dc ] \[Lambda])/
   Sqrt[ (s + \[Theta]c)] /. {Sqrt[Dc] F1 \[Lambda] -> A1, 
   cinf \[Theta]c \[Lambda] -> A2}

Out[159]= A2/(s + \[Theta]c) - (
 A1 E^(((lh - x) Sqrt[s + \[Theta]c])/Sqrt[Dc]))/Sqrt[s + \[Theta]c]

In[160]:= eq13 = s *q[x, s] - Dp*D[q[x, s], {x, 2}] - pinf + eq12 == 0

Out[160]= -pinf + A2/(s + \[Theta]c) - (
  A1 E^(((lh - x) Sqrt[s + \[Theta]c])/Sqrt[Dc]))/Sqrt[
  s + \[Theta]c] + s q[x, s] - Dp 
\!\(\*SuperscriptBox[\(q\), \*
TagBox[
RowBox[{"(", 
RowBox[{"2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[x, s] == 0

In[161]:= eq14 = \[Alpha]1*(q[x, s] /. x -> lh) - (D[q[x, s], x] /. 
     x -> lh) == 0

Out[161]= \[Alpha]1 q[lh, s] - 
\!\(\*SuperscriptBox[\(q\), \*
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[lh, s] == 0

In[162]:= eq15 = (D[q[x, s], x] /. x -> +\[Infinity]) == 0

Out[162]= 
\!\(\*SuperscriptBox[\(q\), \*
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[\[Infinity], s] == 0

In[163]:= eq50 = 
 Assuming[(lh - x) < 0 && s > 0 && (s + \[Theta]c) > 0 && Dp > 0 && 
     Dc > 0 && \[Alpha]1 > 0, 
    DSolve[{eq13, eq14, eq15}, q[x, s], {x, s}, 
     GeneratedParameters -> B4]] // Simplify // Normal


Out[163]= {{q[x, 
    s] -> (E^(-(Sqrt[s]/Sqrt[Dp] + Sqrt[s/
          Dp]) x) (-A2 (-Dc s + 
           Dp (s + \[Theta]c)) (-4 E^(Sqrt[s/Dp] (lh + x)) Sqrt[Dp/s]
             s Sqrt[s/Dp] Sqrt[s + \[Theta]c] Sqrt[
            Dp s (s + \[Theta]c)] - 
           Dp (E^((2 Sqrt[s] x)/Sqrt[Dp])
                s (Sqrt[s/Dp] + \[Alpha]1) (s + \[Theta]c) + 
              E^(2 Sqrt[s/Dp] x)
                s (Sqrt[s/Dp] + \[Alpha]1) (s + \[Theta]c) - 
              2 E^(Sqrt[s/Dp] (lh + x)) Sqrt[s/
               Dp] (2 s^2 + 
                 2 s \[Theta]c + \[Alpha]1 Sqrt[s + \[Theta]c] Sqrt[
                  Dp s (s + \[Theta]c)]))) + 
        Sqrt[s/
         Dp] (1/(Sqrt[s/Dp] Sqrt[s + \[Theta]c])
             Dp pinf (-2 E^(Sqrt[s/Dp] (lh + x)) Sqrt[s/
               Dp] (Sqrt[Dp/s] s^4 Sqrt[Dp s (s + \[Theta]c)] + 
                 5 Sqrt[Dp/s] s^3 \[Theta]c Sqrt[
                  Dp s (s + \[Theta]c)] + 
                 6 Sqrt[Dp/s] s^2 \[Theta]c^2 Sqrt[
                  Dp s (s + \[Theta]c)] + 
                 2 Sqrt[Dp/s] s \[Theta]c^3 Sqrt[
                  Dp s (s + \[Theta]c)] + 
                 Sqrt[Dp/s] s^(5/2) Sqrt[s + \[Theta]c] Sqrt[
                  s (s + \[Theta]c)] Sqrt[Dp s (s + \[Theta]c)] - 
                 s \[Alpha]1 Sqrt[
                  Dp^3 s^5 (s + \[Theta]c)] - \[Alpha]1 \[Theta]c \
Sqrt[Dp^3 s^5 (s + \[Theta]c)]) - 
              Dp (s + \[Theta]c) (E^((2 Sqrt[s] x)/Sqrt[Dp])
                   s (Sqrt[s/Dp] + \[Alpha]1) (s + \[Theta]c)^(5/2) + 
                 E^(2 Sqrt[s/Dp] x)
                   s (Sqrt[s/Dp] + \[Alpha]1) (s + \[Theta]c)^(5/2) - 
                 2 E^(Sqrt[s/Dp] (lh + x)) Sqrt[s/
                  Dp] (2 s^3 Sqrt[s + \[Theta]c] + 
                    4 s^2 \[Theta]c Sqrt[
                    s + \[Theta]c] + \[Alpha]1 \[Theta]c^2 Sqrt[
                    Dp s (s + \[Theta]c)] + 
                    2 s \[Theta]c (\[Theta]c Sqrt[
                    s + \[Theta]c] + \[Alpha]1 Sqrt[
                    Dp s (s + \[Theta]c)])))) + 

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

              Dp (E^((2 Sqrt[s] x)/Sqrt[Dp]) pinf s^2 Sqrt[
                  Dp s] (s + \[Theta]c)^2 + 
                 E^(2 Sqrt[s/Dp] x) pinf s^2 Sqrt[
                  Dp s] (s + \[Theta]c)^2 + (
                 A1 E^((2 Sqrt[s] x)/Sqrt[
                   Dp] + (lh - x) Sqrt[(s + \[Theta]c)/Dc])
                   s (Dp s (s + \[Theta]c))^(3/2))/Dp + (
                 A1 E^(2 Sqrt[s/Dp] x + (lh - x) Sqrt[(s + \[Theta]c)/
                    Dc]) s (Dp s (s + \[Theta]c))^(3/2))/Dp - 
                 2 E^(Sqrt[s/
                   Dp] (lh + 
                    x)) (A1 (Sqrt[Dp s] Sqrt[Dp s^5] \[Alpha]1 Sqrt[
                    s + \[Theta]c] + (
                    2 s (Dp s (s + \[Theta]c))^(3/2))/Dp) + 
                    pinf Sqrt[
                    Dp s] (2 s^4 + 4 s^3 \[Theta]c + 
                    2 s^2 \[Theta]c^2 + 
                    s \[Alpha]1 \[Theta]c Sqrt[s + \[Theta]c] Sqrt[
                    Dp s (s + \[Theta]c)] + \[Alpha]1 Sqrt[
                    s + \[Theta]c] Sqrt[
                    Dp s^5 (s + \[Theta]c)])))))))/(2 Dc Dp^3 (s/Dp)^(
      3/2) (Sqrt[s/Dp] + \[Alpha]1) (s + \[Theta]c)^(3/2) Sqrt[
      Dp s (s + \[Theta]c)] (Sqrt[s/Dp] - Sqrt[(s + \[Theta]c)/
        Dc]) (Sqrt[s/Dp] + Sqrt[(s + \[Theta]c)/Dc]))}}

In[164]:= eq51 = 
 Assuming[(lh - x) < 0 && s > 0 && (s + \[Theta]c) > 0 && Dp > 0 && 
   Dc > 0 && \[Alpha]1 > 0, FullSimplify[q[x, s] /. eq50[[1, 1]]]]

Out[164]= -(E^(-2 Sqrt[s/Dp]
      x) (2 A2 s (-Dp E^(Sqrt[s/Dp] (lh + x)) \[Alpha]1 + 
         E^(2 Sqrt[s/Dp]
            x) (Sqrt[Dp s] + Dp \[Alpha]1)) (s + \[Theta]c) (-Dc s + 
         Dp (s + \[Theta]c)) + 
      Sqrt[s/Dp] (-1/(Sqrt[(s (s + \[Theta]c))/Dp])2 Dp E^(
           Sqrt[s/Dp] x)
            pinf (-Dp (E^(lh Sqrt[s/Dp]) - E^(
                Sqrt[s/Dp] x)) s \[Alpha]1 (s + \[Theta]c)^(7/2) + 
             E^(Sqrt[s/Dp]
                x) (\[Theta]c^3 Sqrt[Dp s^3 (s + \[Theta]c)] + 
                3 \[Theta]c^2 Sqrt[Dp s^5 (s + \[Theta]c)] + 
                3 \[Theta]c Sqrt[Dp s^7 (s + \[Theta]c)] + Sqrt[
                Dp s^9 (s + \[Theta]c)])) + 
         2 Sqrt[Dc]
           Dp s (s + \[Theta]c) (pinf (Sqrt[Dc] E^(2 Sqrt[s/Dp] x)
                 s + (E^(2 Sqrt[s/Dp] x) - E^(
                  Sqrt[s/Dp] (lh + x))) Sqrt[
                Dc Dp s] \[Alpha]1) (s + \[Theta]c) + 
            A1 (-Sqrt[Dp] E^(Sqrt[s/Dp] (lh + x)) s^(3/2) - 
               E^(Sqrt[s/
                 Dp] (lh + x)) (Sqrt[Dp s] \[Theta]c + \[Alpha]1 Sqrt[
                   Dc Dp s (s + \[Theta]c)]) + 
               E^(2 Sqrt[s/Dp] x + (lh - x) Sqrt[(s + \[Theta]c)/

                  Dc]) (s Sqrt[Dc (s + \[Theta]c)] + \[Alpha]1 Sqrt[
                   Dc Dp s (s + \[Theta]c)]))))))/(2 Dp s^2 (Sqrt[s/
      Dp] + \[Alpha]1) (s + \[Theta]c)^2 (-Dc s + Dp (s + \[Theta]c)))

In[165]:= eq52 = 
 ExpandAll[eq51, 
    x] /. {(Sqrt[s/Dp] + \[Alpha]1) -> ((
      Sqrt[s] + Sqrt[ Dp ] \[Alpha]1)/Sqrt[ Dp ]), 
    Sqrt[s/Dp] -> Sqrt[s]/Sqrt[ Dp ]} // Normal

Out[165]= (
 A2 Sqrt[Dp]
   E^((lh Sqrt[s])/Sqrt[Dp] - (Sqrt[s] x)/Sqrt[Dp]) \[Alpha]1)/(
 s (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c)) - (
 A2 (Sqrt[Dp s] + Dp \[Alpha]1))/(
 Sqrt[Dp] s (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c)) - (
 Dc pinf Sqrt[
  s])/((Sqrt[s] + Sqrt[Dp] \[Alpha]1) (-Dc s + 
    Dp (s + \[Theta]c))) - (Sqrt[Dc] pinf Sqrt[Dc Dp s] \[Alpha]1)/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (-Dc s + 
    Dp (s + \[Theta]c))) + (
 Sqrt[Dc] E^((lh Sqrt[s])/Sqrt[Dp] - (Sqrt[s] x)/Sqrt[Dp]) pinf Sqrt[
  Dc Dp s] \[Alpha]1)/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (-Dc s + 
    Dp (s + \[Theta]c))) + (
 A1 Sqrt[Dc] Sqrt[Dp]
   E^((lh Sqrt[s])/Sqrt[Dp] - (Sqrt[s] x)/Sqrt[
   Dp]) s)/((Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
    Dp (s + \[Theta]c))) + (Dp pinf \[Alpha]1 (s + \[Theta]c)^(3/2))/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) Sqrt[(s (s + \[Theta]c))/
  Dp] (-Dc s + Dp (s + \[Theta]c))) - (
 Dp E^((lh Sqrt[s])/Sqrt[Dp] - (Sqrt[s] x)/Sqrt[Dp])
   pinf \[Alpha]1 (s + \[Theta]c)^(3/2))/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) Sqrt[(s (s + \[Theta]c))/
  Dp] (-Dc s + Dp (s + \[Theta]c))) + (
 A1 Sqrt[Dc]
   E^((lh Sqrt[s])/Sqrt[Dp] - (Sqrt[s] x)/Sqrt[
   Dp]) (Sqrt[Dp s] \[Theta]c + \[Alpha]1 Sqrt[
     Dc Dp s (s + \[Theta]c)]))/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
    Dp (s + \[Theta]c))) - (
 A1 Sqrt[Dc] E^(
  lh Sqrt[(s + \[Theta]c)/Dc] - 
   x Sqrt[(s + \[Theta]c)/
    Dc]) (s Sqrt[Dc (s + \[Theta]c)] + \[Alpha]1 Sqrt[
     Dc Dp s (s + \[Theta]c)]))/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
    Dp (s + \[Theta]c))) + (
 pinf (\[Theta]c^3 Sqrt[Dp s^3 (s + \[Theta]c)] + 
    3 \[Theta]c^2 Sqrt[Dp s^5 (s + \[Theta]c)] + 
    3 \[Theta]c Sqrt[Dp s^7 (s + \[Theta]c)] + Sqrt[
    Dp s^9 (s + \[Theta]c)]))/(
 s^(3/2) (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c)^2 Sqrt[(
  s (s + \[Theta]c))/Dp] (-Dc s + Dp (s + \[Theta]c)))

In[166]:= eq53 = Map[FullSimplify, eq52]

Out[166]= (A2 Sqrt[Dp] E^((Sqrt[s] (lh - x))/Sqrt[Dp]) \[Alpha]1)/(
 s (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c)) - (
 A2 (Sqrt[Dp s] + Dp \[Alpha]1))/(
 Sqrt[Dp] s (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c)) - (
 Dc pinf Sqrt[
  s])/((Sqrt[s] + Sqrt[Dp] \[Alpha]1) (-Dc s + 
    Dp (s + \[Theta]c))) - (Sqrt[Dc] pinf Sqrt[Dc Dp s] \[Alpha]1)/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (-Dc s + 
    Dp (s + \[Theta]c))) + (
 Sqrt[Dc] E^((Sqrt[s] (lh - x))/Sqrt[Dp]) pinf Sqrt[
  Dc Dp s] \[Alpha]1)/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (-Dc s + 
    Dp (s + \[Theta]c))) + (
 A1 Sqrt[Dc] Sqrt[Dp] E^((Sqrt[s] (lh - x))/Sqrt[
  Dp]) s)/((Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
    Dp (s + \[Theta]c))) + (
 pinf Sqrt[s] \[Alpha]1 (s + \[Theta]c)^(
  5/2))/((Sqrt[s] + Sqrt[Dp] \[Alpha]1) ((s (s + \[Theta]c))/Dp)^(
  3/2) (-Dc s + Dp (s + \[Theta]c))) - (
 E^((Sqrt[s] (lh - x))/Sqrt[Dp]) pinf Sqrt[
  s] \[Alpha]1 (s + \[Theta]c)^(
  5/2))/((Sqrt[s] + Sqrt[Dp] \[Alpha]1) ((s (s + \[Theta]c))/Dp)^(
  3/2) (-Dc s + Dp (s + \[Theta]c))) + (
 A1 Sqrt[Dc] E^((Sqrt[s] (lh - x))/Sqrt[
  Dp]) (Sqrt[Dp s] \[Theta]c + \[Alpha]1 Sqrt[
     Dc Dp s (s + \[Theta]c)]))/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
    Dp (s + \[Theta]c))) - (
 A1 Sqrt[Dc]
   E^((lh - x) Sqrt[(s + \[Theta]c)/
   Dc]) (s Sqrt[Dc (s + \[Theta]c)] + \[Alpha]1 Sqrt[
     Dc Dp s (s + \[Theta]c)]))/(
 Sqrt[s] (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
    Dp (s + \[Theta]c))) + (
 pinf (\[Theta]c^3 Sqrt[Dp s^3 (s + \[Theta]c)] + 
    3 \[Theta]c^2 Sqrt[Dp s^5 (s + \[Theta]c)] + 
    3 \[Theta]c Sqrt[Dp s^7 (s + \[Theta]c)] + Sqrt[
    Dp s^9 (s + \[Theta]c)]))/(
 s^(3/2) (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c)^2 Sqrt[(
  s (s + \[Theta]c))/Dp] (-Dc s + Dp (s + \[Theta]c)))

In[167]:= eq54 = 
 Collect[eq52, { E^((lh Sqrt[s])/Sqrt[Dp] - (Sqrt[s] x)/Sqrt[Dp]), E^(
   lh Sqrt[(s + \[Theta]c)/Dc] - x Sqrt[(s + \[Theta]c)/Dc])}, 
  Simplify]

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

            Dp^2 Sqrt[s + \[Theta]c] Sqrt[(s (s + \[Theta]c))/
             Dp]))))/(s^(
    3/2) (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c) (-Dc s + 
      Dp (s + \[Theta]c))) + (-Sqrt[Dc] Sqrt[Dp] pinf s^2 Sqrt[
     Dc Dp s] \[Alpha]1 (s + \[Theta]c)^3 + 
    Dc s^(5/2) (s + \[Theta]c)^2 (A2 Sqrt[Dp s] + A2 Dp \[Alpha]1 - 
       Sqrt[Dp] pinf Sqrt[s] (s + \[Theta]c)) + 
    1/(Sqrt[s + \[Theta]c])
      Dp (-A2 s^(3/2) (Sqrt[Dp s] + Dp \[Alpha]1) (s + \[Theta]c)^(
        7/2) + Sqrt[Dp] pinf Sqrt[(s (s + \[Theta]c))/
        Dp] (Dp s \[Alpha]1 (s + \[Theta]c)^4 + 
          Sqrt[s + \[Theta]c] (\[Theta]c^3 Sqrt[
              Dp s^3 (s + \[Theta]c)] + 
             3 \[Theta]c^2 Sqrt[Dp s^5 (s + \[Theta]c)] + 
             3 \[Theta]c Sqrt[Dp s^7 (s + \[Theta]c)] + Sqrt[
             Dp s^9 (s + \[Theta]c)]))))/(Sqrt[Dp] s^(
    5/2) (Sqrt[s] + Sqrt[Dp] \[Alpha]1) (s + \[Theta]c)^3 (-Dc s + 
      Dp (s + \[Theta]c)))

In[168]:= eq55 = 
 Assuming[s > 0 && (s + \[Theta]c) > 0 && Dp > 0 && Dc > 0, 
   FullSimplify[eq54[[1]]] + FullSimplify[eq54[[2]]] + 
    FullSimplify[eq54[[3]]]] // Normal

Out[168]= (-A2 + pinf (s + \[Theta]c))/(s (s + \[Theta]c)) - (
 A1 E^((lh - x) Sqrt[(s + \[Theta]c)/Dc]) Sqrt[Dc/
  s] (s Sqrt[Dc (s + \[Theta]c)] + \[Alpha]1 Sqrt[
     Dc Dp 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 s] \[Alpha]1 (-
POSTED BY: Zhonghui Ou
Answer
2 months ago

This way it becomes reasonably simple in my opinion:

sol = Out[163];
solSimplified = 
  Assuming[(lh - x) < 0 && s > 0 && (s + \[Theta]c) > 0 && Dp > 0 && 
    Dc > 0 && \[Alpha]1 > 0, 
   Simplify@
    PowerExpand@Simplify[Simplify[PowerExpand[Numerator@sol]]/
       FullSimplify[Expand[Denominator@sol]]]];
solSimplified // Apart // PowerExpand // FullSimplify
POSTED BY: Gianluca Gorni
Answer
2 months ago

Dear Gianlua, Would you like to explain the difference Simplify@ and Simplify[ ]? Thanks.

POSTED BY: Zhonghui Ou
Answer
2 days ago

They are the same. You can write f@x or f[x], they have the same effect. The syntax with @ can only be used with functions of one variable: Simplify[Sqrt[x^2], x>0] cannot be written with @. When you can use @ you can save brackets and the code is simpler. For example, in f@g@h@x you can remove g@ without caring for the brackets. It is more difficult to remove g from f[g[h[x]]].

POSTED BY: Gianluca Gorni
Answer
2 days ago

You can for pure functions, for example:

Simplify[#, x > 0] &@Sqrt[x^2]

Sqrt[x^2] // Simplify[#, x > 0] &

and do things like

f@Sequence[x, y, z]
(*f[x,y,z]*)

f@@{x, y, z}
(*f[x,y,z]*)

f @@@ {{5, 6}, {9, 7}, {2, 5}}
(*{f[5,6],f[9,7],f[2,5]}*)

Not necessarily always convenient or shorter, but can come handy sometimes.

POSTED BY: Kapio Letto
Answer
2 days ago

@Zhonghui Ou, the question about @ is very basic and you could try searching docs for relevant info first as the rules of the forum suggest: http://wolfr.am/READ-1ST

There is, for example, this tutorial: How to | Use Shorthand Notations:

http://reference.wolfram.com/language/howto/UseShorthandNotations.html

This forum has written useful tips for beginners:

http://community.wolfram.com/groups/-/m/t/1070264

see Sander Huisman answer there about short notations (and other tips too). We would also suggest:

  • Do not overload screen with too much not-needed code, it makes it hard to read:
    • Avoid using Greek letters - they make code much longer
    • Out cells are not always needed - given Input people can just run your code
    • Try to minimize your example to the essence of your issue
POSTED BY: Moderation Team
Answer
2 days ago

Dear Gianluca, Thanks for your help.

POSTED BY: Zhonghui Ou
Answer
2 months ago

The simplest form can be gotten by two steps with the help of Mr. Gorni,

In[79]:= eq51 = 
 PowerExpand[q[x, s] /. eq50[[1, 1]]] // FullSimplify // Normal

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

In[80]:= eq52 = ExpandAll[eq51, x] // Cancel

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

Group Abstract Group Abstract