title: Integration of a system of differential equations MATLAB
body: <p>I am a fairly new Matlab user which I had to explore to numerically integrate a system of differential equations. Now I am trying to resolve a simple equation but which gives me a "lambertw" output.</p>
  
  <pre><code>(s - 1) * exp(-s) = k
  </code></pre>
  
  <p>Therefore, for a given k, with <code>k &lt; exp(2)</code> I should get approximately two different values of "s". Here is the bit of code I use for this task (using symbolic toolbox): </p>
  
  <pre><code>%%Hopf bifurcation calculations
  syms s
  solve((s-1) * exp(-s) == k, s)
  %uhopf = s*k 
  </code></pre>
  
  <p>And the output: </p>
  
  <pre><code>1 - lambertw(0, -(3*exp(1))/25)
  </code></pre>
  
  <p>After looking at some <a href="https://stackoverflow.com/questions/5584873/matlab-how-do-i-write-a-statement-that-will-give-me-time-on-xaxis-from-y-0-3/5585982#5585982">examples</a> I tried to get an explicit solution with no success:</p>
  
  <pre><code>syms x
  x=solve('(s-1)*exp(-s) == k')
  </code></pre>
  
  <p>Finally, my question is how do I change the result given in the first place into a simple numerical value that fir a given k would give me s1 and s2. Any hint or help would be much appreciated ! I am still looking at some other examples.</p>