# How to factor out and cut off a parameter

In an exemplary expression

expr = -6 3^(1/3) c1 kL^4 L^2 (δ^3/L^3)^(1/3)


all parameters are real, especially L > 0. FullSimplify[] with the assumption L > 0

FullSimplify[ expr, L > 0]


cancels out the parameter L.

How can I force Mathematica to do this simplification inside a function?

sol = {w ->Function[{x}, -6 3^(1/3) c1 kL^4 L^2 (δ^3/L^3)^(1/3)
BesselI[1/3, (2 (-kL^2 L)^(3/2))/(3 L^(3/2) δ^3)] Gamma[4/3] ]}


Thanks!

• Thank you for your fast answer. The example I gave was to easy... Please look at my edit. – Ulrich Neumann Mar 21 '18 at 14:38
• "the parameter L in the argument can be cut" - what does this mean? If you meant that the L^(3/2) in the numerator and denominator should cancel out, then @Artes's suggestion works. – J. M. will be back soon Mar 21 '18 at 14:40
• In your revised example you left out the assumption L > 0, i.e., the second argument to FullSimplify. Although Simplify would be sufficient. – Bob Hanlon Mar 21 '18 at 14:44
• Thanks. I corrected my input. – Ulrich Neumann Mar 21 '18 at 14:47
• @J.M. Sorry for my wording and thanks for your hint – Ulrich Neumann Mar 21 '18 at 14:59

The problem is that Function is HoldAll, so you need to work around that. Here is one method:

Activate @ Simplify[Inactivate[Evaluate @ sol, Function], L>0]


{w -> Function[{x}, -6 3^(1/3) c1 kL^4 L (δ^3)^(1/3) BesselI[1/3, (2 (-kL^2)^(3/2))/(3 δ^3)] Gamma[4/3]]}

FullSimplify[
BesselJ[-(1/
3), (2 (kL^2 L + L \[Delta]^3)^(3/2))/(3 L^(3/
2) \[Delta]^3)] Gamma[
2/3] HypergeometricPFQ[{2/3}, {4/3,
5/3}, -((kL^2 L + (L - x) \[Delta]^3)^3/(9 L^3 \[Delta]^6))],
Assumptions -> {L \[Element] Reals, L > 0,
k \[Element] Reals, \[Delta] \[Element] Reals,
kL \[Element] Reals}]

sol = {w ->
Function[{x}, -6 3^(1/3) c1 kL^4 L^2 (\[Delta]^3/L^3)^(1/
3) BesselI[
1/3, (2 (-kL^2 L)^(3/2))/(3 L^(3/2) \[Delta]^3)] Gamma[4/3]]};

ReplacePart[sol, {1, -1, -1} -> Simplify[sol[[1, -1, -1]], L > 0]]

(* {w -> Function[{x}, -6 3^(1/3) c1 kL^4 L (\[Delta]^3)^(1/3)
BesselI[1/3, (2 (-kL^2)^(3/2))/(3 \[Delta]^3)] Gamma[4/3]]} *)