title: Issues with log function coding
body: <p>I am new at R studio and I am trying to solve the following issues</p>
  <p>I have a function that basically is</p>
  <h1>Profit = Revenue - Advertisement spent</h1>
  <h1>Once revenue is based on how much I spend we can rewrite such as Profit = F(Ad_spend) - Ad_spend</h1>
  <p>Based on the log curve line the coeff is below as follow:</p>
  <p>Log equation
  -507.3997+193.0983*log(x) - x</p>
  <p>I am having issues to write this function and I need to have my derivative based on that and find out what is the Ad_spend that maximize my profit.</p>
  <p>Thanks.</p>