The actuator line model is a widely used tool to represent wind turbine blades when performing numerical simulations of flow over wind turbines and wind farms. In this work, a theoretical approach is used to improve the actuator line model. In the actuator line model, a Gaussian kernel is used to establish the width over which the body forces are distributed. An optimal body force distribution is found based on two-dimensional aerodynamics. This optimal distribution is tested on a three-dimensional large eddy simulation of a wind turbine in uniform inflow. The optimal distribution is able to resolve the aerodynamics of the blade, including the tip vortices. The optimal distribution, requires grid resolutions on the order of 1,000 grid points across the rotor. A theoretical framework is developed to predict the behavior of the ALM near the tip. Based on this framework, a new correction is developed to represent the effects of having an optimal distribution, while using a non-optimal distribution. This allows the use of much coarser grid resolutions, while still obtaining the same results of using an optimal distribution.