[New] Problem :compute an antiderivative of
where
.
>> assume(a,Type::RealNum): assume(b,Type::RealNum): assume(a^2<b^2):
>> int(1/(a+b*cos(x)),x);
2 2 2 2 1/2
- ln((2 a sin(x) - 2 b sin(x) + 2 b (- a + b ) +
2 2 1/2 2 2 1/2
2 a cos(x) (- a + b ) ) / b) / (2 (- a + b ) ) + ln((
2 2 2 2 1/2
- 2 a sin(x) + 2 b sin(x) + 2 b (- a + b ) +
2 2 1/2 2 2 1/2
2 a cos(x) (- a + b ) ) / b) / (2 (- a + b ) )
[New] Problem :differentiate the above antiderivative and find again
.
>> normal(simplify(normal(diff(%,x))));
1
------------
a + b cos(x)
[New] Problem :compute the derivative of
(piecewise defined).
>> a:=proc(x) begin if x < 0 then -x else x end_if end_proc:
>> D(a);
proc(x)
begin
if x < 0 then
-1
else
1
end_if
end_proc
[New] Problem :compute the anderivative of
(piecewise defined).
>> a:=proc(x) begin if x < 0 then -x else x end_if end_proc:
>> int(a);
proc(x)
begin
if x < 0 then
x^2*(-1/2)
else
x^2*1/2
end_if
end_proc