0
$\begingroup$

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!

$\endgroup$
  • $\begingroup$ Thank you for your fast answer. The example I gave was to easy... Please look at my edit. $\endgroup$ – Ulrich Neumann Mar 21 '18 at 14:38
  • $\begingroup$ "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. $\endgroup$ – J. M. will be back soon Mar 21 '18 at 14:40
  • $\begingroup$ In your revised example you left out the assumption L > 0, i.e., the second argument to FullSimplify. Although Simplify would be sufficient. $\endgroup$ – Bob Hanlon Mar 21 '18 at 14:44
  • $\begingroup$ Thanks. I corrected my input. $\endgroup$ – Ulrich Neumann Mar 21 '18 at 14:47
  • $\begingroup$ @J.M. Sorry for my wording and thanks for your hint $\endgroup$ – Ulrich Neumann Mar 21 '18 at 14:59
5
$\begingroup$

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]]}

$\endgroup$
1
$\begingroup$
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}]
$\endgroup$
0
$\begingroup$

Using ReplacePart

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]]} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.