Sure. But as a solo pilot you would hardly ever fly the DG by yourself. A single costs about $36 per hour. Also you would never take a tow to 3000' or 4000' AGL. It is more common to get off between 1500' to 2000' AGL which equates to $27 and $33 for the tow. In addition a normal glider flight is 2 hours or more which halves the hourly rate of the tow. Of course not every tow results in the glider getting away and this tends to raise the cost of gliding. (This has never happened to me but I have heard of it happening to others. )
Costs aside gliding does teach skills that make a power pilot a better pilot, IMO. So, for the power pilot, learning to glide is money well spent.