Symbolic integration of c/(b*z-a)
1 view (last 30 days)
Show older comments
Dear all,
I want to integrate c/(b*tau-a) from tau=0 to tau=z with the assumptions a>0, b>0 c>0 and z<a/b.
In Maple it works:
eq1 := c/(b*tau-a); eq2 := int(eq1,tau=0..z, AllSolutions) assuming a::positive, b::positive, c::positive, z<a/b;
with the result:
c*(ln(-b*z+a)-ln(a))/b
How can I do this in MATLAB?
Thanks a lot!
1 Comment
John D'Errico
on 14 Dec 2016
Please stop adding answers every time you wish to make a comment. Use the comment button instead.
Accepted Answer
Star Strider
on 14 Dec 2016
Use the simplify function:
syms a b c tau z real
assume(a>0)
assume(b>0)
assume(c>0)
assume(z<a/b)
out1 = int( c/(b*tau-a),tau,0,z);
out2 = simplify(out1, 'Steps',20)
out2 =
(c*log(a - b*z))/b - (c*log(a))/b
See Also
Categories
Find more on Symbolic Math Toolbox 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!