Integration with symbolic boundaries
5 views (last 30 days)
Show older comments
i have a polynomial in z and would like to integrate w.r.t. z between 0 and (h+d) where h is a known value and d is unknown and therefore symbolic. Is there any function in matlab that would allow me to do this?
here is what i have tried
function [Pa,Za,Pp,Zp,Residual_d,Tie_rod_force] = calculate_thrusts_and_their_locations(Qa,Qp,gamma_b_a,gamma_b_p,h0,h,Cd,Phi_d,Ka,Kp,Z0)
syms d z
AVS = Qa + gamma_b_a*z;
AHS = -2*Cd*sqrt(Ka) + Ka*AVS;
PVS = Qp + gamma_b_p*d;
PHS = 2*Cd*sqrt(Kp) + Kp*PVS;
Pa = INT(AHS,z,Z0,(h+d));
Za = (INT((z*Pa),z,Z0,(h+d)))/Pa;
Pp = INT(PHS,z,0,d);
Zp = (INT((z*Pp),z,0,d))/Pp;
Residual_d = Pa*Za - Pp*Zp;
Tie_rod_force = Pa - Pp;
end
all the inputs of this function are numerical values!
0 Comments
Accepted Answer
Walter Roberson
on 28 Nov 2011
The symbolic toolbox int() should be able to handle that. Of course the values you get out will not necessarily be easily expressed.
Why are you dividing Za by Pa when it is constructed, and dividing Zp by Pp when that is constructed, but then multiplying by those factors again when calculating the Residual_d ?
More Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!