Magnetic force on a triangular loop 
This triangular loop has sides of length $a$ and is $d$ distance away from a straight long conducting wire. The current I on the long wire moves from left to right and the current i on the triangular loop moves counter-clockwise. The question is to find the magnetic force on that triangular loop due to the long wire. 

I first found the magnetic field of the long wire, but I'm a bit confused on the net force on the triangle. Do the forces on the two opposing sides of the triangle cancel out? 
 A: The magnetic field generated by the long wire is $\textbf B=\frac{\mu _0I}{2\pi y} \hat z$ (coming out of the board) [See Griffiths Introduction to Electrodynamics Example 5.5]. the triangle is on the x-y plane, and part of difficulty will be selecting coordinates for where to place the triangle (In theory the answer should be independent of origin).
We also use the equation for moving charge in a magnetic field generating force: $\textbf F=\int Id\textbf r\times \textbf B$. 
Since the bottom of the triangle is parallel to the wire this is the easiest piece to find the force. Using the right-hand rule, $\textbf B$ points out of the board, current on the triangle points left, so the thumb (Force points down). Also, the Current along the bottom and the magnetic field $\textbf B$ are perpendicular, so the force along the bottom integrates to $\frac{\mu _0 I^2 a}{2 \pi d}$.
The complicated part is the two side pieces of the triangle. An infinitesimal piece of force (which we will integrate), $d\textbf F=Id\textbf r\times \textbf B=I(dx \hat x+dy \hat y+dz \hat z)\times \frac{\mu _0I}{2\pi y} \hat z=\frac{\mu _0I^2}{2\pi y}(-dx\hat y+dy \hat x)$.
Next, we exploit symmetry, $dy$ will travel up along the left side and then down along the right side, with same magnitudes of force, so that the $\hat x$ components of forces cancel eachother. $dx$ travels from the right corner to the left corner, however we will integrate from the top corner to the left corner, and then the magnitude on both sides should be the same.
Considering the triangle to be equilateral, each angle is 60 degrees. So if we place the origin in such a way so that if we imagine extanding the left side of the triangle it passes through the origin, this makes a linear function with zero y-intercept, the ratio of y-coordinate to x-coordinate will be the tangent of 60 degrees: $\sqrt 3=\tan 60 = \frac{y}{x}$, or the linear function $y=\sqrt 3 x$. The y-coordinate of that bottom corner is $d$, so the x-coordinate is $d/\sqrt 3$. The x-coordinate of the top-corner is $d/\sqrt 3+a/2$. Integrating yields: $$F=-\frac{\mu _0I^2}{2\pi \sqrt 3}\int _{d/\sqrt 3+a/2}^{d/\sqrt 3}\frac{1}{x}dx =\frac{\mu _0I^2}{2\pi \sqrt 3}\ln \left[\frac{d/\sqrt 3+a/2}{d/\sqrt 3}\right]$$
By examining the right-hand rule on both sides of the triangle, the $\hat y$ components of force both point up. So, adding all three together yields: $$\textbf F=\left(\frac{\mu _0I^2}{\pi \sqrt 3}\ln \left[\frac{d/\sqrt 3+a/2}{d/\sqrt 3}\right]-\frac{\mu _0 I^2 a}{2 \pi d}\right)\hat y$$
