Skip to content

Commit ccef9c0

Browse files
committed
Update README to include derivatives
2 parents 1bab186 + ffa50d9 commit ccef9c0

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# LegendrePolynomials.jl
22

33
![CI](https://github.com/jishnub/LegendrePolynomials.jl/workflows/CI/badge.svg?branch=master)
4+
[![codecov](https://codecov.io/gh/jishnub/LegendrePolynomials.jl/branch/master/graph/badge.svg?token=PGMRgetYmz)](https://codecov.io/gh/jishnub/LegendrePolynomials.jl)
45
[![stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://jishnub.github.io/LegendrePolynomials.jl/stable)
56
[![dev](https://img.shields.io/badge/docs-latest-blue.svg)](https://jishnub.github.io/LegendrePolynomials.jl/dev)
67

@@ -25,7 +26,14 @@ julia> Pl(0.5, 20)
2526
-0.04835838106737356
2627
```
2728

28-
To compute all the polynomials for `0 <= l <= lmax`, use
29+
To compute the n-th derivative of the Legendre polynomial of degree `l` at the argument `x`, use `dnPl(x, l, n)`:
30+
31+
```julia
32+
julia> dnPl(0.5, 10, 5)
33+
-61760.91796875
34+
```
35+
36+
To compute all the polynomials for `0 <= l <= lmax`, use `collectPl(x; lmax)`
2937

3038
```julia
3139
julia> collectPl(0.5, lmax = 5)
@@ -38,6 +46,19 @@ julia> collectPl(0.5, lmax = 5)
3846
0.08984375
3947
```
4048

49+
To compute all the n-th derivatives for `0 <= l <= lmax`, use `collectdnPl(x; n, lmax)`
50+
51+
```julia
52+
julia> collectdnPl(0.5, lmax = 5, n = 3)
53+
6-element OffsetArray(::Array{Float64,1}, 0:5) with eltype Float64 with indices 0:5:
54+
0.0
55+
0.0
56+
0.0
57+
15.0
58+
52.5
59+
65.625
60+
```
61+
4162
Check the documentation for other usage.
4263

4364
# License

0 commit comments

Comments
 (0)