0

given initial condition: $x_0$ and final condition $x_t$ the solution for the ODE $y'(x) = k\cdot y(x) + a$ is $y(x) = (y_0+\frac{a}{k})\cdot e^{kt} - \frac{a}{k}$.

When trying to find $k$ I get the equation: $(y_0+\frac{a}{k})\cdot e^{kt} - \frac{a}{k} = y_t$. When multiplying by $k$ we get: $(y_0\cdot k+ a)\cdot e^{kt} - a = y_t\cdot k$. While searching I found the Lambert's $W(x)$ function. But I didn't manage in manipulating the equation enough to use $W(x)$ function.

Lambert's function in wikipedia https://en.wikipedia.org/wiki/Lambert_W_function

ME post about $W(x)$ computation:Lambert- W -Function calculation?

user5721565
  • 1,390
  • 11
  • 23

1 Answers1

1

I have the feeling that the equation in $k$ $$(x_0\cdot k+ a)\cdot e^{kt} - a = x_t\cdot k$$ cannot be solved in terms of the usual Lambert function except in the case where $x_0=0$.

If this was the case, the solution would be $$k=-\frac a{x_t}-\frac 1{t}W\left(-\frac{a t }{x_t}e^{-\frac{a t}{x_t}}\right)$$

However (but this is not simple), there is a solution in terms of the generalized Lambert function (have a look here -equations $(3)$ and $(4)$).