The history of variational calculus dates back to the late 17th century when Johann Bernoulli presented his famous problem concerning the brachistochrone curve. Since then, variational calculus has developed intensively as many problems in physics and engineering are described by equations from this branch of mathematical analysis. This paper presents two non-classical, distinct methods for solving such problems. The first method is based on the differential transform method (DTM), which seeks an analytical solution in the form of a certain functional series. The second method, on the other hand, is based on the physics-informed neural network (PINN), where artificial intelligence in the form of a neural network is used to solve the differential equation. In addition to describing both methods, this paper also presents numerical examples along with a comparison of the obtained results.Comparingthe two methods, DTM produced marginally more accurate results than PINNs. While PINNs exhibited slightly higher errors, their performance remained commendable. The key strengths of neural networks are their adaptability and ease of implementation. Both approaches discussed in the article are effective for addressing the examined problems.