ABSTRACT In this manuscript, we carried out a thorough analysis of the general SIR model for epidemics. We broadened the model to include vaccination, treatment, and incidence rate. The vaccination rate is a testament to the alternatives made by individuals when it comes to receiving vaccinations and merging with the community of the recovered. The treatment rate measures how often people who have contracted a disease are able to transition into the recovered category. The continuous Galerkin-Petrov method, specifically the cGP(2)-method, is employed to calculate the numerical solutions of the models. The cGP(2)-method imperative to analyse two unknowns over every time interval. The unknowns can be determined by solving a block system of size (2 × 2). This approach demonstrates a strong level of precision throughout the entire time interval, with an impressive rate of convergence at the discrete time points. In addition, the article investigates the concept of the basic reproduction number ( R 0 ) and explores the intricacies of conducting sensitivity analysis of the developed system.