The antiderivative of 2x is x^2 + C, where C is a real number of some type. There is an operation used for polynomial functions, even if for only one term, that makes the calculation simpler.
Antiderivatives are similar to integrating a function. When taking the derivative of a polynomial term such as ax^n, where a and n are real numbers, the derivative is anx^(n-1). Multiply by the power and reduce the power of x by 1. The same formula can be used regardless of the number of terms in the polynomial if the terms are all in this form. A constant without an x term is simply zero.
The antiderivative is the opposite of the derivative. Where the derivative required multiplying by the power and reducing that power by 1, it is necessary to do the opposite in the antiderivative; raise the power by 1 and divide by the new power. Generalizing to bx^m, where b and m are real numbers, the antiderivative is [bx^(m+1)] / (m+1). While this is the individual term, an antiderivative always includes a constant to represent any constant that was part of the original function and became zero upon calculating the derivative.
If looking at the antiderivative of 2x again, it is calculated as [2x^2] / 2 = x^2 + C.
Work can be checked by finding the derivative of the antiderivative. If it is equal, save for the constant, the process is correct.