Skip to content
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ integrate(log(x), x) # Returns -x + x*log(x)
integrate(f, x, RischMethod()) # Explicit method choice
integrate(f, x, RischMethod(use_algebraic_closure=true)) # With options
```
The +c in all the integration results is omitted. It's worth noting that for this reason if the result is $ln(...)$, it actually means $ln(...)+c=ln(... * c_1)=ln(.../c_2)$ for any constants $c, c_1, c_2$.


## Integration Methods
Expand Down
5 changes: 5 additions & 0 deletions src/methods/rule_based/one_var_predicates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ P_lt_neg1_x_0(x::UFI) = lt(-1, x, 0)::Bool
P_gt_0(x::UFI) = gt(x, 0)::Bool
P_lt_x_0(x::UFI) = lt(x, 0)::Bool
P_le_neg1_x_0(x::UFI) = le(-1, x, 0)::Bool

# For variable p predicates (rule 1.1.1.3)
P_igt_x_0(x::UFI) = igt(x, 0)::Bool
P_gt_x_1(x::UFI) = gt(x, 1)::Bool
P_lt_0_x_1(x::UFI) = lt(0, x, 1)::Bool
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

file_rules = [
# (* ::Subsection::Closed:: *)
# (* 1.1.1.3 (a+b x)^m (c+d x)^n (e+f x)^p *)
Expand Down Expand Up @@ -25,9 +26,8 @@ file_rules = [
(~b)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)*(~f)*((~n) + (~p) + 2)) : nothing))

("1_1_1_3_3",
:(∫(((~a) + (~!b)*(~x))*((~!d)*(~x))^(~!n)*((~e) + (~!f)*(~x))^(~!p),(~x)) ) => :(
:(∫(((~a) + (~!b)*(~x))*((~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p::P_igt_x_0),(~x)) ) => :(
!contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) &&
igt((~p), 0) &&
eq((~b)*(~e) + (~a)*(~f), 0) &&
!(
ilt((~n) + (~p) + 2, 0) &&
Expand All @@ -36,9 +36,8 @@ file_rules = [
∫(ext_expand(((~a) + (~b)*(~x))*((~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)), (~x)) : nothing))

("1_1_1_3_4",
:(∫(((~a) + (~!b)*(~x))*((~!d)*(~x))^(~!n)*((~e) + (~!f)*(~x))^(~!p),(~x)) ) => :(
:(∫(((~a) + (~!b)*(~x))*((~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p::P_igt_x_0),(~x)) ) => :(
!contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) &&
igt((~p), 0) &&
(
!eq((~n), -1) ||
eq((~p), 1)
Expand Down Expand Up @@ -134,21 +133,18 @@ file_rules = [
∫(ext_expand(((~e) + (~f)*(~x))^(~p)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)), (~x)) : nothing))

("1_1_1_3_12",
:(∫(((~!e) + (~!f)*(~x))^(~p)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :(
!contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) &&
lt(0, (~p), 1) ?
:(∫(((~!e) + (~!f)*(~x))^(~p::P_lt_0_x_1)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :(
!contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ?
((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^((~p) - 1)⨸((~a) + (~b)*(~x)), (~x)) - ((~d)*(~e) - (~c)*(~f))⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^((~p) - 1)⨸((~c) + (~d)*(~x)), (~x)) : nothing))

("1_1_1_3_13",
:(∫(((~!e) + (~!f)*(~x))^(~p)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :(
!contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) &&
gt((~p), 1) ?
:(∫(((~!e) + (~!f)*(~x))^(~p::P_gt_x_1)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :(
!contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ?
(~f)*((~e) + (~f)*(~x))^((~p) - 1)⨸((~b)*(~d)*((~p) - 1)) + 1⨸((~b)*(~d))* ∫(((~b)*(~d)*(~e)^2 - (~a)*(~c)*(~f)^2 + (~f)*(2*(~b)*(~d)*(~e) - (~b)*(~c)*(~f) - (~a)*(~d)*(~f))* (~x))*((~e) + (~f)*(~x))^((~p) - 2)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing))

("1_1_1_3_14",
:(∫(((~!e) + (~!f)*(~x))^(~p)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :(
!contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) &&
lt((~p), -1) ?
:(∫(((~!e) + (~!f)*(~x))^(~p::P_lt_x_neg1)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :(
!contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ?
(~f)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~p) + 1)*((~b)*(~e) - (~a)*(~f))*((~d)*(~e) - (~c)*(~f))) + 1⨸(((~b)*(~e) - (~a)*(~f))*((~d)*(~e) - (~c)*(~f)))* ∫(((~b)*(~d)*(~e) - (~b)*(~c)*(~f) - (~a)*(~d)*(~f) - (~b)*(~d)*(~f)*(~x))*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing))

("1_1_1_3_15",
Expand All @@ -158,10 +154,8 @@ file_rules = [
(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^(~p)⨸((~a) + (~b)*(~x)), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^(~p)⨸((~c) + (~d)*(~x)), (~x)) : nothing))

("1_1_1_3_16",
:(∫(((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~p)/((~!a) + (~!b)*(~x)),(~x)) ) => :(
:(∫(((~!c) + (~!d)*(~x))^(~!n::P_igt_x_0)*((~!e) + (~!f)*(~x))^(~p::P_lt_x_neg1)/((~!a) + (~!b)*(~x)),(~x)) ) => :(
!contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) &&
igt((~n), 0) &&
lt((~p), -1) &&
isfraction((~p)) ?
∫(ext_expand(((~e) + (~f)*(~x))^ fracpart((~p)), ((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^intpart((~p))⨸((~a) + (~b)*(~x)), (~x)), (~x)) : nothing))

Expand Down Expand Up @@ -217,10 +211,9 @@ file_rules = [
ext_den((~m))*int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)⨸((~b)*(~e) - (~a)*(~f) - ((~d)*(~e) - (~c)*(~f))*(~x)^ext_den((~m))), (~x), (~x), ((~a) + (~b)*(~x))^(1⨸ext_den((~m)))⨸((~c) + (~d)*(~x))^(1⨸ext_den((~m))), "1_1_1_3_22") : nothing))

("1_1_1_3_23",
:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :(
:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n::P_gt_0)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :(
!contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) &&
eq((~m) + (~n) + (~p) + 2, 0) &&
gt((~n), 0) &&
(
sumsimpler((~m), 1) ||
!(sumsimpler((~p), 1))
Expand Down