Symbolic integration of c/(b*z-a)

1 view (last 30 days)
Ludwig
Ludwig on 14 Dec 2016
Commented: John D'Errico on 14 Dec 2016
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
John D'Errico on 14 Dec 2016
Please stop adding answers every time you wish to make a comment. Use the comment button instead.

Sign in to comment.

Accepted Answer

Star Strider
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

More Answers (3)

Torsten
Torsten on 14 Dec 2016
Use "int".
https://de.mathworks.com/help/symbolic/int.html
Best wishes
Torsten.

Ludwig
Ludwig on 14 Dec 2016
Edited: Ludwig on 14 Dec 2016
Thanks for the answer, I did this already but I am not sattisfied with the result:
clear
syms a b c tau z
assume(a>0)
assume(b>0)
assume(c>0)
assume(z<a/b)
int( c/(b*tau-a),tau,0,z)

Ludwig
Ludwig on 14 Dec 2016
Thanks!

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!