Calculate the following symbolic integral?

Consider the following code:

f[x_] := g[x]/g'[x] 

FullSimplify[Integrate[f[x], x]]

So I have the code above but when I run it it gives me back some random expression. I’m trying to make it return something in terms of g(x) but it won’t.

How would I make it give me F(x) in terms of g(x)?

1/4 (x^2 + 2 Log[x])

^ What it returns when I run the code. Where is it getting that from?

What is g[x]?

I don’t have it set to anything, I want it to be generic and just give F(x) in terms of g(x) and it’s derivatives so that that stuff can just be plugged in. I want it to just be symbolic

There exists no formula for an integral that works for all g(x), So, if you quit your kernel, you’ll see that Mathematica simply returns an unevaluated form:

Enter

 Quit[];

.

Then enter

 f[x_] := g[x]/g'[x]
FullSimplify[Integrate[f[x], x]]
\int \frac{g (x)}{g'(x)} \, dx.

This variant gives a useful result:

Integrate[g'[x]/g[x], x]

Ah thanks, quitting the kernal worked for that. Sucks that there’s no general solution for that form of integral

Sucks that there’s no general solution for that form of integral

There are even simpler forms that “do not work”; what kind of output in terms of g(x) you would expect from

\int g(x) \mbox{d}x

without specifying g(x) ?

Fair enough, I was trying to find a general form for the function whose derivative is the inverse of the derivative of log[g(x)]

Nick Arnold:
Try Gianluca Gorni’s input. I must have forgot that there was a standard solution for

Integrate[g'[x]/g[x], x]

.

A bit of impetuous formal manipulation perhaps illuminates. In the integrand (1/g) (dg/dx) dx, the dx cancel, leaving dg/g. The dependence on x has disappeared. This doesn’t happen with the integrand you want to integrate, so the integral cannot be performed without knowledge of the functional relationship between g and x.

Did you have in mind something like this?

D[InverseFunction[Composition[Log, g]][x], x] /. x -> Log[g[y]]