0
$\begingroup$

I am new to Mathematica, and I'm not sure how to solve a system of equations that include differentiation.

Given that f and g are differentiable functions:

f(x) < 0 for all x  
g(5) = 2  
h(x) = f(x) / g(x)  
h'(x) = f'(x) / g(x)  
Then g(x) = ?

(The answer is 2)

I didn't expect it to work, but I tried this:

DSolve[{f[x] < 0, g[5] = 2, h[x] == f[x]/g[x], h'[x] = f'[x]/g[x]}, g[x], x]

And of course it didn't work.

How would I do this?

$\endgroup$
  • $\begingroup$ Possibly a duplicate... $\endgroup$ – kukac67 Apr 8 '14 at 21:40
  • 1
    $\begingroup$ Reduce[D[f[x]/g[x], x] == f'[x]/g[x], g[x]] $\endgroup$ – Dr. belisarius Apr 8 '14 at 21:54
  • 1
    $\begingroup$ @belisarius beat me to this, but...h[x] = f[x]/g[x]; Solve[D[h[x], x] == f'[x]/g[x], g'[x]] $\endgroup$ – Daniel Lichtblau Apr 8 '14 at 21:56
  • $\begingroup$ @DanielLichtblau Why does that work? $\endgroup$ – kukac67 Apr 8 '14 at 21:58
  • $\begingroup$ And thanks for the answer! $\endgroup$ – kukac67 Apr 8 '14 at 22:00
2
$\begingroup$

Reduce[ ] tells you something useful about those functions:

Reduce[D[f[x]/g[x], x] == f'[x]/g[x], g[x]]

(* (f[x] == 0 && g[x] != 0) || 
   (Derivative[1][g][x] == 0 && g[x] != 0) *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.