Skip to content

Commit 848f539

Browse files
committed
updated gsoc final report [skip ci]
1 parent ca1b89b commit 848f539

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

GSoCfinalReport_MattiaMichelettaMerlin.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,26 @@ As of september 2025, end of GSoC, I translated more than 3400 rules and the sys
3333
```julia
3434
julia> integrate(sqrt(4 - 12*x + 9*x^2)+sqrt(1+x),x)
3535
-------Applied rule 0_1_0 on (sqrt(1 + x) + sqrt(4 - 12x + 9(x^2)), x)
36-
| ( +(a...), x) => sum([ (f, x) for f in a ])
36+
| ( a + b + ..., x) => (a,x) + (b,x) + ...
3737
-------with result: (sqrt(4 - 12x + 9(x^2)), x) + (sqrt(1 + x), x)
3838
-------Applied rule 1_1_1_1_4 on (sqrt(1 + x), x)
3939
| ((a + b * x) ^ m, x) => if
4040
| !(contains_var(a, b, m, x)) &&
41-
| !(eq(m, -1))
41+
| m !== -1
4242
| (a + b * x) ^ (m + 1) / (b * (m + 1))
4343
-------with result: (2//3)*((1 + x)^(3//2))
4444
-------Applied rule 1_2_1_1_3 on (sqrt(4 - 12x + 9(x^2)), x)
4545
| ((a + b * x + c * x ^ 2) ^ p, x) => if
4646
| !(contains_var(a, b, c, p, x)) &&
4747
| (
48-
| eq(b ^ 2 - 4 * a * c, 0) &&
49-
| !(eq(p, -1 / 2))
48+
| b ^ 2 - 4 * a * c == 0 &&
49+
| p !== -1 / 2
5050
| )
5151
| ((b + 2 * c * x) * (a + b * x + c * x ^ 2) ^ p) / (2 * c * (2 * p + 1))
5252
-------with result: (1//36)*(-12 + 18x)*((4 - 12x + 9(x^2))^(1//2))
5353
(2//3)*((1 + x)^(3//2)) + (1//36)*(-12 + 18x)*sqrt(4 - 12x + 9(x^2))
5454

55+
5556
julia> integrate((2+2x+2x^2)/(1+x^3);verbose=false)
5657
(2//3)*log(1 + x^3) + 2.3094010767585034atan(0.14433756729740646(-4 + 8x))
5758

@@ -108,7 +109,7 @@ julia> integrate(acosh(x+1);verbose=false)
108109
and much more. I also added 27585 tests (integrals with their correct solution) from the RUBI package and an automated testing procedure that can be used to test the package.
109110

110111
While this shows impressive integration capabilities, there is still work left to do, which I briefly list here and describe in detail below.
111-
- Most importantly, there are still some problems with the SymbolicUtils `@rule` macro that prevent some expressions from being integrated even though the rules are present, and that slow down the package.
112+
- Most importantly, there are still some problems with the SymbolicUtils `@rule` macro that prevent some expressions from being integrated even though the rules are present, and that slows down the package.
112113
- There are still some rules not translated, mainly those involving trigonometric functions, hyperbolic functions, and special functions.
113114
- Finally, during the summer, a Julia package has been revived that performs symbolic integration using various algorithms, and we decided to create one unified package where the user can choose which integration strategy to use. I thus need to move all my code to that repository, the [pull request](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/pull/12) is underway.
114115

@@ -156,31 +157,30 @@ julia> r = @rule sin(~x) + cos(~x) => 1
156157
sin(~x) + cos(~x) => 1
157158

158159
julia> r(sin(x)+cos(x))
159-
1
160+
# no result = rule not applied
160161

161162
julia> r(sin(a)+cos(a))
162-
# rule not applied
163-
163+
1
164164
```
165165

166166
This occurs because the ordering of the arguments of the `+` operation is different in the two expressions:
167167

168168
```julia
169169
julia> arguments(sin(x)+cos(x))
170170
2-element SymbolicUtils.SmallVec{Any, Vector{Any}}:
171-
sin(x)
172171
cos(x)
172+
sin(x)
173173

174174
julia> arguments(sin(a)+cos(a))
175175
2-element SymbolicUtils.SmallVec{Any, Vector{Any}}:
176-
cos(a)
177176
sin(a)
177+
cos(a)
178178
```
179179

180-
In the second case, it differs from the one defined in the rule (sin first, then cos). So I made the operations `+` and `*` commutative in rules.
180+
In the first case, it differs from the one defined in the rule (sin first, then cos). So I made the operations `+` and `*` commutative in rules.
181181

182182
### Negative Exponent Support
183-
Previously, a rule like `(~x)^(~m)` didn't match an expression like `1/x^3` with `~m=-3`, and this was crucial for the correct functioning of my package. So I changed this behavior, and now exponents can match divisions using a negative value as the exponent. This was trickier than it seems, because a division in SymbolicUtils can be represented in many ways: `(1/...)^(...))`, `1/(...)^(...)`, `1/(...)`, `(...)/(...)` and in fact in some rare cases this is still not working properly (read neim problem section below).
183+
Previously, a rule like `(~x)^(~m)` didn't match an expression like `1/x^3` with `~m=-3`, and this was crucial for the correct functioning of my package. So I changed this behavior, and now exponents can match divisions using a negative value as the exponent. This was trickier than it seems, because a negative power in SymbolicUtils can be represented in many ways: `(1/...)^(...))`, `1/(...)^(...)`, `1/(...)`, `(...)/(...)` and in fact in some rare cases this is still not working properly (read neim problem section below).
184184

185185
### Other Minor Enhancements
186186

@@ -300,7 +300,7 @@ I did also some minor stuff in two other julia repo:
300300

301301
# What's left to do
302302
The problems holding back the most number of expressions to be integrated are:
303-
- **rules not translated**: As described above translating rules is not that fast, while it can be automated in some parts, the translation of the utlility functions cannot be automated and in general one has to test if rules get applied correctly. The rules not yet translated are the ones involving mainly tirgonometric functions, hyperbolic functions and specia functions. For a general introduction on how to translate rue, there is the [Contributing](https://github.com/Bumblebee00/SymbolicIntegration.jl?tab=readme-ov-file#contributing) section of the readme.
303+
- **rules not translated**: As described above translating rules is not that fast, while it can be automated in some parts, the translation of the utlility functions cannot be automated and in general one has to test if rules get applied correctly. The rules not yet translated are the ones involving mainly tirgonometric functions, hyperbolic functions and special functions. For a general introduction on how to translate rue, there is the [Contributing](https://github.com/Bumblebee00/SymbolicIntegration.jl?tab=readme-ov-file#contributing) section of the readme.
304304
- **@rule macro**: While I improved it, there are still some problems in the rule macro. The two biggest are:
305305
- - **neim problem**: a rule like `(~a + ~b*~x)^(~m)*(~c + ~d*~x)^(~n)` doesnt match the expression `(1+2x)^2/(3+4x)^2` with `~n=-2`. For more info you can read [the issue](https://github.com/JuliaSymbolics/SymbolicUtils.jl/issues/777) or see this [WIP pr](https://github.com/JuliaSymbolics/SymbolicUtils.jl/pull/778) in which i try to implement a solution.
306306
- - **oooomm problem**: a rule can match an expression in more than one way, but, for how rules are implemented currently, only one is returned and it might be the wrong one. For more detail read [the issue](https://github.com/JuliaSymbolics/SymbolicUtils.jl/issues/776) and see this [WIP pr](https://github.com/JuliaSymbolics/SymbolicUtils.jl/pull/772) in which i try to implement a solution.

0 commit comments

Comments
 (0)