syms Delta_P_lo Delta_x phi_lo Delta_P_f x LB UB
Delta_P_f = Delta_P_lo * (1/Delta_x .* int(phi_lo.^2, x, LB, UB, 'hold', true))
Delta_P_f =
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/803389/image.png)
The 'hold', true is there to prevent int() from immediately doing the integral.
is independent of x so int() would treat it as being constant in x and would immediate do the integration, leaving you with something that did not include the integration sign. If
is dependent on x then the code would need to be changed a little to reflect that. I had to introduce LB and UB as the bounds of integration because it happens that the 'hold' feature would be misinterpreted as being bounds if you were to try to do indefinite integration while 'hold' is on.