Simulation - Find the maximum of a function with exponential decay

806 Views Asked by At

I need to run a program to calculate the integral of the following function with exponential decay $$t(x) = \exp(-Lx)(a\sin(bx) + d\cos(ex))$$

and for a simulation purpose, I need to find maximum of this function without using derivatives (so I want to do this analitically)on the interval $[0,\infty)$. In this function, all the parameters are non negative, so I've notes that the function is oscillating and decreasing.

My guess is that I have to estimate a value of $x$ such that the function assusmes it maximum using the given parameters a,b,c,d,e,f and L . Of course that, since I am doing a simulation, I don't need the exactly value that the function assumes a maximum value, just an estimation. But I couldn't find any relation that approximate this point, and I would like a sugestion (if there is any)

I hope my doubt is clear.

Edit: Of course that we can find the $x$ such that the trigonometric part assumes maximum analitically and in function of its parameters. But I don't see how to fit the exponential part

Thanks in advance!

1

There are 1 best solutions below

1
On BEST ANSWER

You have several options:

  1. You can use a one-dimensional function maximizer. They are discussed in any numerical analysis text. I like Numerical Recipes Obsolete versions are free online

  2. You can take the derivative analytically, then use a one dimensional root finder. Again any text can help you

  3. For heuristics, you can consider that you have three length scales-the inverses of $L,b,e$ If $L$ is small compared to $b,e$ the trig functions will go through many cycles before the exponential decreases much. You can ignore the exponential factor and use the analytic maximum of the trig function part. If $L$ is large compared to $b,e$ the exponential term will dominate and the maximum will come at $x=0$ (or close by). If $b$ and $e$ are quite different, the greater one will go through many cycles while the lesser one goes through just one. The peaks will then line up and the maximum of the trig factor is $|a|+|d|$