Fitting a pdf against Weibull pdf I have a pdf function as follows:
$$\dfrac{1}{s+a-b} [bs e^{-bt} + (a-b)(s+a)e^{-(s+a)t}]$$
I want to fit this against a weibull pdf with shape=1.12 and scale=461386. I want to calculate the values of s,a and b. Is there any standard tool for doing this?
Prasenjit
 A: Moment matching is a standard tool.  Whether it works well needs to be determined.  The mean $\mu_1$ and the next two central moments $\mu_2$ and $\mu_3$ of this mixture-of-exponentials PDF are
$$\eqalign{
\mu_1 &= \frac{\frac{s}{b}+\frac{a-b}{a+s}}{a-b+s} \\
\mu_2 &= \frac{b^2+s (2 a+s)}{b^2 (a+s)^2} \\
\mu_3 &= \frac{2 \left(1+\frac{-a^3+b^3}{(a+s)^3}\right)}{b^3}.
}$$
Equate these with the corresponding moments of the Weibull distribution (which equal $442626$, $1.56725 \times 10^{11}$, and $1.04716 \times 10^{17}$, respectively) and solve.  The general solution is a little messy but easy to compute:
$$\eqalign{
s &= \frac{4 \mu_1^3-6 \mu_1 \mu_2+\mu_3 \pm \sqrt{-2 \left(\mu_1^6-3 \mu_1^4 \mu_2+9 \mu_1^2 \mu_2^2-9 \mu_2^3\right)+4 \mu_1 \left(2 \mu_1^2-3 \mu_2\right) \mu_3+\mu_3^2}}{\mu_1^4+3 \mu_2^2-2 \mu_1 \mu_3} \
a &= -\frac{2 \left(\mu _1^3-3 \mu _1 \mu _2+\mu _3\right)}{\mu _1^4+3 \mu _2^2-2 \mu _1 \mu _3} \
b &= \pm \frac{2 \mu _1^3- \mu _3-\sqrt{\left(4 \mu _1^3-2 \mu _3\right){}^2-24 \left(\mu _1^2-\mu _2\right) \left(\mu _1^4+3 \mu _2^2-2 \mu _1 \mu _3\right)}}{\mu _1^4+3 \mu _2^2-2 \mu _1 \mu _3}
}$$
(Notice that all the denominators are the same.)
The two solutions differ by interchanging $b$ with $a+s$, as would be expected from the symmetry in the pdf: they are two distinct parameterizations of the same pdf.
The solutions for this particular Weibull distribution turn out to be $a = 1.72179 \times 10^{-6}$ and either (i) $s = 2.49314 \times 10^{-6}$, $b = 2.88012 \times 10^{-6}$ or, equivalently, (ii) $s = 1.15833\times 10^{-6}$, $b = 4.21493\times 10^{-6}$.  In the figure, the blue line shows the PDF of the Weibull distribution and the red line shows the mixture-of-exponentials fit:

The distributions look a little different for small values.  Here is a magnified version near 0:

The mixture of exponentials just cannot reproduce the behavior of a Weibull distribution in this range.  If the fit will be used to assess probabilities in the right tail, though, we might be ok.
Another natural way to compare two distributions is by the vertical deviations between their CDFs:

At this scale, the two look coincident: this is good.  To appreciate the differences better, look at the differences between the two CDFs (fitted minus actual):

They never differ by more than +0.006 or less than -0.003.  Therefore, when using the CDFs to compute probabilities of any interval, the results will never be wrong by more than 0.006 - (-0.003) = 0.009, less than 1%.  The differences in the right tails apparently go to zero, indicating the fit ought to be very good for right tail probabilities.
A: Mixture of exponential distributions
This answer is only partial, as it deals mainly with mixture of exponentials, which is only a part the proposed distribution family (cf infra) and comments
Edit: Added title, part 2 (EM algorithm for minimizing Kullback Leibler divergence) and 3 (numerical application) 
All this answer has been inspired by a previous state of vinux’ answer who suggested to use EM algorithm.
1. Mixture of exponentials 
First this remark: this pdf can be re-written as a mixture of exponential distributions.
The pdf is 
$$f(t) = \dfrac{1}{s+a-b} [bs e^{-bt} + (a-b)(s+a)e^{-(s+a)t}],$$
which can be rewriten as a mixture 
$$f(t) = \pi \lambda_1 e^{-\lambda_1 t} + (1-\pi) \lambda_2 e^{-\lambda_2 t}, $$
where
$$\begin{array}{rcl} 
\lambda_1 &=& b \\
\lambda_2 &=& s+a \\
\pi &=& {s \over s+a-b} \end{array}$$
or equivalently
$$\begin{array}{rcl} 
a &=& (1-\pi) \lambda_2 + \pi \lambda_1  \\
b &=& \lambda_1 \\
s &=& \pi (\lambda_2-\lambda_1) \end{array}$$
All this for $t\le 0$; for $t<0$, $f(t)=0$.
This is a much more natural way to write it (even allowing "improper mixtures" with $\pi < 0$ or $\pi > 1$).
As an advantage, the moments of the exponential distributions are known, and now computing the moments of this distribution is straightforward.
2. Adaptation of EM algorithm
In the case of a proper mixture, we adapt EM algorithm to the minimization of the Kullback Leibler divergence, or equivalently to the maximization of
$$\int_0^\infty \log \left( f(x)\right) g(x) \mathrm d x,$$
where
$$g(x) = \left({k\over \lambda}\right)\left({x\over \lambda}\right)^{k-1} e^{ -\left({x\over\lambda}\right)^k} $$ is the Weibull density ($\lambda = 461386$ and $k=1.12$).
I don’t give details, I think those who know EM will recognize it...
a. Initialization. Start with $\pi^{(0)} = 0.5$, $\lambda_1^{(0)} = 1$, $\lambda_2^{(0)} = 2$, and $i=0$.
b. E-step. Let 
$$\tau^{(i)}(x) = { \pi^{(i)} \lambda_1^{(i)} e^{-\lambda_1^{(i)} x} \over \pi^{(i)} \lambda_1^{(i)} e^{-\lambda_1^{(i)} x} + (1-\pi{(i)}) \lambda_2^{(i)} e^{-\lambda_2^{(i)} x} }.$$
c. M-step. Let
$$\lambda_1^{(i+1)} = \left( { \int_0^\infty \tau^{(i)} (x) x g(x) \mathrm d x \over \int_0^\infty \tau^{(i)} (x) g(x) \mathrm d x}\right)^{-1},$$
$$\lambda_2^{(i+1)} = \left( { \int_0^\infty (1-\tau^{(i)} (x)) x g(x) \mathrm d x \over \int_0^\infty (1-\tau^{(i)} (x)) g(x)\mathrm d x}\right)^{-1},$$
$$\pi^{(i+1)} = \int_0^\infty \tau^{(i)}(x) g(x) \mathrm d x.$$
(Note that linearity of integral leads to straightforward simplifications of the expression of $\lambda_2^{(i+1)}$.
d. Increment $i$ and go back to the E-step, until convergence.
3. Numerical application
The above integrals are surely computable exactly, however I use numerical integration below; this will make the analogy with classical EM clear.
EMexp <- function(x, pi=0.5, lambda1=1, lambda2=10, ite=100)
{
  N <- length(x);
  Nmu <- sum(x);

  for(i in 1:ite)
  {
    f1 <- lambda1*exp(-lambda1*x);
    f2 <- lambda2*exp(-lambda2*x);
    tau <- pi*f1/(pi*f1+(1-pi)*f2)

    stau <- sum(tau);
    staux <- sum(tau*x);
    lambda1 <- stau/staux;
    lambda2 <- (N-stau)/(Nmu-staux);
    pi <- stau/N;
  }
  return(list(pi=pi, lambda1=lambda1, lambda2=lambda2));
}

k = 1.12
lambda = 461386

N <- 1e6;
x <- qweibull( seq(0,1,length=N+2)[2:(N+1)], k, lambda)

The we do:
> EMexp(x, 0.5, 2e-6, 3e-6);

$pi
[1] 0.5085704

$lambda1
[1] 2.259258e-06

$lambda2
[1] 2.259258e-06

The two components collapse, it seems that (from the point of view of KL divergence) a mixture of two exponential distributions don’t approximate this Weibull better than a single exponential distribution does (I tried with several starting points, it always converge here). This deserve to be checked by a theoretical approach, however I have no time now.
A: This pdf is a mixture of two exponential distribution. Maximum likelihood estimates of parameters will be difficult. The suggestion is
For quick solution use method of moments procedure. First three moments of this pdf equate with weibull moments. 
