Message Boards Message Boards

[✓] Use Assuming and Substitute commands to simplify the expression?

GROUPS:

I used the commands Assuming and /. to simplify the expression, but they didn't work. Would you like to have a look at this issue? Thanks.

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

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

In[123]:= eq2 = 
 Assuming[s > 0 && (s + \[Theta]c) > 0 && Dp > 0, 
   Cancel[eq1]] /. {Sqrt[Dp s] -> Sqrt[Dp] Sqrt[ s], 
   Sqrt[Dp s (s + \[Theta]c)] ->  
    Sqrt[Dp ] Sqrt[ s ] Sqrt[s + \[Theta]c], 
   Sqrt[s/Dp] -> Sqrt[s]/Sqrt[Dp]}

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

Assuming does not do anything unless you put a Simplify or Reduce or Integration inside of it. The form should be

Assuming[a>0, Simplify[expression]]

Regards

POSTED BY: Neil Singer
Answer
26 days ago

I tried but there is no change. Thanks for your tips.

In[125]:= eq43 = Assuming[s > 0 && (s + \[Theta]c) > 0, Cancel[eq42]]

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

It worked for me. Your example does not have a Simplify in it. Cancel[] does not use Assuming.

Assuming[s > 0 && (s + \[Theta]c) > 0 && Dp > 0, 
  Simplify[eq1]] /. {Sqrt[Dp s] -> Sqrt[Dp] Sqrt[s], 
  Sqrt[Dp s (s + \[Theta]c)] -> Sqrt[Dp] Sqrt[s] Sqrt[s + \[Theta]c], 
  Sqrt[s/Dp] -> Sqrt[s]/Sqrt[Dp]}
POSTED BY: Neil Singer
Answer
26 days ago

An alternative method.

Look at

FullForm[eq1]

and find the exact form your expression appears in. This may be different from the displayed form, particularly when there are denominators or negative exponents. Copy the exact form from the FullForm into your replacement pattern like these which I found in your eq1:

eq2 = eq1 /. {Power[Times[Dp, s], Rational[-1, 2]] -> 1/(Sqrt[Dp]*Sqrt[s]), 
   Power[Times[Dp, s, Plus[s, \[Theta]c]], Rational[-1, 2]] -> 1/(Sqrt[Dp] Sqrt[s] Sqrt[s + \[Theta]c]), 
   Power[Times[Power[Dp, -1], s], Rational[-1, 2]] -> 1/(Sqrt[s]/Sqrt[Dp])}

The precise format of the right hand side of each replacement rule is not as critical as the left hand side.

This method often takes more work, but will sometimes succeed when trying again and again to find a way to make the substitution work has failed.

After the substitution there may be automatic changes to the format before it is displayed. It is even possible that the automatic changes may undo your some or all of your substitutions, like if you wanted to substitute 7*7 for 49 or x*x for x squared or other less obvious things.

POSTED BY: Bill Simpson
Answer
26 days ago

Group Abstract Group Abstract