Find the magnetic field of an infinite wire at distance $2R$, given the field at distance $R$ 
If the magnetic field of an infinite wire at a distance $R$ is is $0.4 \;\text{T}$, find the field at a distance $2R$.

The approach suggested by internet is as follows:
Magnetic field due to an infinite wire is:
$$B = \frac{\mu_0I}{2\pi R}$$
or as given:
$$0.4 = \frac{\mu_oI}{2\pi R}$$
When R is doubled,
$$B = \frac{\mu_0I}{2\pi (2R)}$$
On simplification, the answer comes out to be $0.2 \;\text{T}$. It relies on the fact that the angle is not much changed since the wire is relatively infinite, which seems fine to me. But is the following method correct to do the same question?
$$0.4 = \frac{\mu_0I}{4\pi} \int \frac{\text{d}l \sin\theta}{R^2} \tag{1}$$
When R is doubled,
$$\begin{align}B = \frac{\mu_0I}{4\pi} \int \frac{\text{d}l \sin\theta}{(2R)^2} \\ = \frac{\mu_0I}{16\pi} \int \frac{\text{d}l \sin\theta}{R^2} \tag{2}\end{align}$$
Dividing (1) by (2),
$$\frac {0.4}{B} = \left(\frac{\mu_0I}{4\pi} \int \frac {\text{d}l \sin\theta}{R^2}\right) / \left(\frac{\mu_0I}{16\pi} \int \frac {\text{d}l \sin\theta}{R^2}\right) \\ \frac {0.4}{B} = 4 \\ B = 0.1 \;\text{T}$$
If the angle is not affected due to the fact that the wire is infinite, then the integration part should get cancelled. Please help me with this.
 A: First case:

Second case:

You seem to be confused to between $r$ and $R$. $r$, used in the Biot-savart law, is the distance of all the elements along the wire from point, whereas $R$ is the distance of the midpoint of the wire from the point.
A: The fact is that the 'R' you are using in the first simplified equation is the perpendicular distance of the point from the wire.                                 Whereas the R you are using in the integration is not the same , the R used here is the distance of the point from the end point of the infinite wire , which is infinite.Here, see the image below for a small wire...

The thing you are confusing is that you are thinking R and r represented in the image as same.
A: In the integration, r is the distance of the elementary part from the concerned dl part. So you cammot directly put that 2R, as this r is something that depends on theta, and is 2R only for theta= 90 degress. So it is recommended to use the first one, as in that r is the perpendicular distance from the line to the concerned point.
