--- title: "Visualisation of the power loss as a function of in-plane wavevector for a dipole near a thin metal film" date: "`r format(Sys.time(), '%d %B, %Y')`" author: "baptiste AuguiƩ" output: rmarkdown::html_vignette: toc: true toc_depth: 2 fig_width: 7 fig_height: 4 fig_caption: true vignette: > %\VignetteIndexEntry{dipole_integrand} %\VignetteEngine{knitr::rmarkdown} \usepackage[utf8]{inputenc} --- ```{r demo, message=FALSE, echo=FALSE} knitr::read_demo("dipole_integrand", package="planar") ``` A dipole near a thin silver film can excite SPPs (on either side of the film, if sufficiently thin), resulting in a strong increase of the total decay rate. The calculation of Mtot requires an integral over the full spectrum of plane waves -- propagating (q<1) and evanescent (q>1). Here we visualise the integrand as a function of wavelength and q. ```{r load, echo=FALSE,results='hide', message=FALSE} ``` ```{r setup, results='hide', fig.width=10} ``` At very large q, the system is well-described by quasi-static image dipole interaction with a slow decay. This results in a time-consuming integration for Mtot, unless special care is taken to transform the integrand; in `dipole()`, the following transformation is used, $$\int_a^\infty f(x)dx = \int_0^1 f(a + t/(1-t)). 1 / (1-t)^2 dt$$