I'd go with @Aarthi's load bearing table resource for a general idea of what's reasonable.
If you're looking for equations though, you can start with these:
Beam Deflection Formulas
Beam Deflection and Stress Calculator
Area Moments of Inertia
Using the Parallel Axis Theorem
Wood Material Properties (Modulus of Elasticity (E) found in Table 4-3a)
For the dynamic loading, you'll want to do something similar to the fun I had on this question.
...and you may want to consult a good Mechanics of Materials book. (cheaper paperback international edition on Ebay)
As @Ian points out, the problem is not a simple one and is best solved by simply using what's worked for other people in the past. Go take a look at the swings at your local park and use the same size of beam, provided the span is comparable.
Also, if you're really worried, you could always make the rope into a 'Y' to eliminate bending stress on the beam, leaving it solely in shear. This way, the beam is bearing the compression load from the lateral tension on the 'Y', which will keep the trees from bowing toward each other.
Diagram:
| |______________________| |
| | | | | |
| tree | | | | tree |
| |__|_________________|_| |
| | \ / | |
| | \ / | |
| | \ / | |
| | \ / | |
| | \ / | |
| | \ / | |
| | \ / | |
| | \ / | |
| | Y | |
| | | | |
| | | | |
| | | | |
...more rope and trees...
| | | | |
| | | | |
| | ----- | |
| | / ___ \ | |
| | | / \ | | |
| | | \___/ | | |
| | \ / | |
| | ----- | |
There's no way to answer this (what will the shelf hold, weight-wise) without knowing what your garage ceiling joists are, if they are part of a truss or just joists, how long the span is, and really, what they were designed to hold up in the first place - many garage ceiling joists are barely in spec to hold drywall, much less a load...
A FAR better attachment method is to place a beam (or more than one) inside the "attic" space across the top of the joists, spanning several, and run threaded rod (steel) through that beam and down through the ceiling to support the item below. In this case it would mean you can spread the load across many more joists (by using a long beam in the attic space.) It also means that you are not depending on wood screws to hold the load directly.
Best Answer
While you do not have enough loading information to give a more exact answer, you could typically use taller and/or larger flange I-joist or 4x2 floor trusses. The key is height to whatever you put in.
I-joist can easily give you the span you need, its just a matter of loading.
For comparable cost at longer spans and higher loadings, floor trusses can pretty much do what ever you want if you give them enough height. Just locate a truss company and meet with them and they should be able to guide you on a proper truss design and get you a quote.
For a barn, I would probably go with I-joist but if you need to run any mechanical or plumbing, I would recommend floor trusses.