Using differentiation to solve equations [duplicate]

Lets say that I have an equation that can't really be solved via elementary means, for e.g:

$$ e^x = 4x$$

Logically, what is wrong with me using equating derivatives (or integrals for that matter)? For e.g:

$$ \dfrac{d}{dx} (e^x) = \dfrac{d}{dx} (4x) $$

or

$$ \int{e^x}{dx} = \int{4x}{dx} $$


Solution 1:

Interpreting both sides as numbers $$ e^x = 4x $$ the equal sign might hold for certain values of $x$.

Interpreting both sides as functions $$ \exp = 4 \mbox{ id} $$ the equal sign is not valid. The differentiation operator acts on functions, that is why the second interpretation has to be used, and explains why the results stay different as well.

If one uses a valid function equality, like $$ \tan x = \sin x / \cos x $$ then the differentiated equation is valid as well: $$ 1+ \tan^2 x = (\cos^2 x + \sin^2 x)/ \cos^2 x $$

Solution 2:

For the equations you write to be true, $x$ has to take on some discrete value. The equality is not true in general. For the equals sign to hold, both sides of the equation need to be constants because it's only an equality when x takes on specific values. This means you can't just take the derivative or integral of both sides because you're changing the nature of the function.

Take a simple example, $x^2=2x$. This has solutions $x=0$ and $x=2$. Take the derivative of both sides, and you get $2x=2$. The solutions to the second equation have nothing to do with the solutions to the first equation, so taking a derivative is not a valid approach in general when only specific solutions exist.