The current investigation focuses on presenting an efficient and reliable computational technique for solving a general class of one‐ and two‐dimensional multi‐term time‐fractional diffusion and diffusion‐wave equation (2D‐MT‐TFD‐DWE) with constant coefficients using the Galerkin scheme based on two distinct choices of basis functions. The major idea for obtaining the proposed numerical algorithms is based on constructing trial functions in the Galerkin scheme as compact combinations of shifted Jacobi polynomials. The existence and uniqueness of the considered problem are investigated using the Lax–Milgram theorem. Five numerical examples are considered with comparisons with analytical solutions and with numerical solutions that are given in the literature using some other existing techniques to confirm the effectiveness and accuracy of the proposed schemes.