"The graph of a certain function $f$ has the slope $4x^3-5$ at each point $(x,y)$ and the line $x+y=0$ is the tangent line to the graph. Find the function $f$."
I took the antiderivative to get $f(x)=x^4-5x+C$ but I'm not really sure how to get the initial conditions. I have that $x+y=0$ or $y=-x$ so the slope is $-1$. I can then plug it into $-1=4x^3-5$ and solve for $x$ to get $x=1$.
I can then plug that x value into $y=-x$ to get $y=-1$. Since the tangent line and the graph must share the same common point then $(1,-1)$ must be on the graph of $f(x)$. So I can solve for the initial condition which means that $-1=1-5+C$ or $3=C$ so $f(x)=x^4-5x+3$ . Is the method correct?