Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oct
oct
Commits
6ab5226c
Commit
6ab5226c
authored
Apr 11, 2012
by
Raymond Toy
Browse files
First cut at Bessel Y. Not working yet.
parent
d795ba71
Changes
1
Hide whitespace changes
Inline
Side-by-side
qd-bessel.lisp
View file @
6ab5226c
...
...
@@ -376,6 +376,7 @@
(
format
t
" term = ~S~%"
term
)
(
format
t
" sum = ~S~%"
sum
))))))
;;
;; TODO:
;; o For |z| <= 1 use the series.
;; o Currently accuracy is not good for large z and half-integer
...
...
@@ -402,6 +403,41 @@
(
+
(
/
-1
z
)
(
sum-ab
big-n
v
z
)
(
sum-big-ia
big-n
v
z
)))))))))
;; Bessel Y
;;
;; bessel_y(v, z) = 1/(2*%pi*%i)*(exp(-%i*v*%pi/2)*I(%i*v,z) - exp(%i*v*%pi/2)*I(-%i*z, v))
;; + z/v/%pi*((1-cos(v*%pi)/z) + S(N,z,v)*cos(v*%pi)-S(N,z,-v))
;;
;; where
;;
;; S(N,z,v) = sum(alpha[n](z)*a[n](0,v) + beta[n](z)*sum(exp(-k*z)*a[n](k,v),k,1,N),n,0,inf)
;; + sum(A[n](v)*I[n](N+1/2,z,v),n,0,inf)
;;
(
defun
bessel-y
(
v
z
)
(
flet
((
ipart
(
v
z
)
(
let*
((
iz
(
*
#c
(
0
1
)
z
))
(
c+
(
exp
(
*
v
(
float-pi
z
)
1/2
)))
(
c-
(
exp
(
*
v
(
float-pi
z
)
-1/2
)))
(
i+
(
exp-arc-i-2
iz
v
))
(
i-
(
exp-arc-i-2
(
-
iz
)
v
)))
(
/
(
-
(
*
c-
i+
)
(
*
c+
i-
))
(
*
#c
(
0
2
)
(
float-pi
z
)))))
(
s
(
big-n
z
v
)
(
+
(
sum-ab
big-n
v
z
)
(
sum-big-ia
big-n
v
z
))))
(
let*
((
big-n
100
)
(
vpi
(
*
v
(
float-pi
z
)))
(
c
(
cos
vpi
)))
(
+
(
ipart
v
z
)
(
*
(
/
z
vpi
)
(
+
(
/
(
-
1
c
)
z
)
(
*
c
(
s
big-n
z
v
))
(
-
(
s
big-n
z
(
-
v
)))))))))
(
defun
paris-series
(
v
z
n
)
(
labels
((
pochhammer
(
a
k
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment