$\int f(x)\,\mathrm{d}x = \left(\int_0^x f(t) \, \mathrm{d}t\right) + C$
The problem with your answer is the problem with your answer.
And I hope the problem with my answer will tell you something about the problem with your answer.
There is the occasional situation where this is a useful thing to do.
You are probably not in one of those situations. You are likely in a situation where your goal is something like
Demonstrate understanding of the integration techniques you've learned in this course
and your answer doesn't do that.
I can't beat @G Sassatelli's answer, but consider what would have happened in your high school class if you were given the problem $$\text{Solve } x^2 -5x + 6 = 0 $$ and you had answered $$ \{x \mid x^2 -5x + 6 = 0\}.$$
If I were your teacher I'd think "This student really understands set builder notation, but hasn't demonstrated any knowledge of factoring quadratics. Too bad the test was on factoring."
But it is a cute answer that displays a good understanding of the notation, as per @John Coleman. If I were you and considering using it on a test, I would give the definite integral answer first and continue with "while this is 100% valid we can also be more explicit ..." and give the usual answer. That way you've shared your fun answer with the teacher but also demonstrated that you know the methods it was intended to test.