The study examines the inverse problem of finding the appropriate righthand side for the subdiffusion equation with the Caputo fractional derivative in a Hilbert space represented by H. The right-hand side of the equation has the form g(t)f and an element f ∈ H is unknown. If the sign of g(t) is a constant, then the existence and uniqueness of the solution is proved. When g(t) changes sign, then in some cases, the existence and uniqueness of the solution is proved, in other cases, we found the necessary and sufficient condition for a solution to exist. Obviously, we need an extra condition to solve this inverse problem. We take the additional condition in the formHere ψ is a given element, of H.