3

I am developing a model for sales forecasting, the basic premise of which is that the rate of change of sales is proportional to the number of possible buyers. In developing this model, I came up with the following ODE,

$$\frac{dB}{dt}=k \left(\sin \left(\frac{\pi t}{6}-\frac{\pi}{2} \right)+1\right)(5000-B)$$

where $k$ is a constant and $(5000-B)$ is the number of possible buyers. $5000$ is the maximum number of possible buyers in a small town, while $B$ is the number of items ($B$) sold after $t$ months.

I created a seasonal factor term which gives a curve that looks like a standard normal curve over a period of $12$ months. When I plot this term in Matlab it gives me exactly the kind of forecasting curve I want where the peak is at $t = 6$ months.

I assumed an initial condition, at $t=0, B=0$ and $\dfrac{dB}{dt} =600$ based on market research.

Now, the problem I have is when I try to solve for $k$, I get a divide by zero error since at $t=0$, the $\sin$ term gives a $-1$. I am using the initial conditions directly in the ODE.

Why is this happening? How can I address the problem?

user76020
  • 123
  • Your initial conditions are impossible. When $t=0$ and $B=0$, $\frac{dB}{dt}$ has to be 0 as well. – rurouniwallace May 12 '13 at 14:30
  • 1
    as Zettasuro noted you have over-specified the problem. Initial condition of a basic ODE is the value of $B$ at a certain time. You have also specified the derivative which made the problem inconsistent. Your model, data, or solution approach need to change. – Maesumi May 12 '13 at 14:46
  • The general solution to the differential equation is $B(t)=\frac{500k^2(\frac{3}{2\pi}\sin{\frac{\pi}{3}}t)-\frac{3}{\pi}\cos{(\frac{\pi}{6}t-\pi/2})+\frac{3}{2}t)+C}{e^{-k\frac{6}{\pi}\cos{(\frac{\pi}{6}-\frac{\pi}{2})+kt}}}$. You need to solve for C using the initial conditions $t=0$ and $B=0$. As stated above though, you may need to set up the DE differently. – rurouniwallace May 12 '13 at 15:02

0 Answers0