Matlab ilaplace not working properly
Show older comments
How can I make matlab return the answer directly and automaticaly?
ilaplace(40/(s*(2*s^3 + s^2 + 6*s + 2)))
% matlab just answers 20 - 40*symsum((exp(t*root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k))*root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k)^2)/(2*(root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k) + 3*root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k)^2 + 3)), k, 1, 3) - 120*symsum(exp(t*root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k))/(2*(root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k) + 3*root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k)^2 + 3)), k, 1, 3) - 20*symsum((exp(root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k)*t)*root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k))/(2*(root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k) + 3*root(s3^3 + s3^2/2 + 3*s3 + 1, s3, k)^2 + 3)), k, 1, 3)
Accepted Answer
More Answers (1)
Walter Roberson
on 25 Nov 2024
Edited: Walter Roberson
on 25 Nov 2024
syms s
sol = ilaplace(40/(s*(2*s^3 + s^2 + 6*s + 2)))
disp(char(sol))
fullsol = rewrite(rewrite(sol, 'expandsum'), 'expandroot')
disp(char(fullsol))
You can simplify() this, but to be honest the result is more messy.
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!