# [✓] Simplify expression/ Turn eq1 into eq2?

Posted 1 year ago
1699 Views
|
4 Replies
|
2 Total Likes
|
 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))) 
4 Replies
Sort By:
Posted 1 year ago
 Collecting the exponential comes close to your form: Collect[eq1, E^_, Simplify] 
Posted 1 year 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))) 
 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)