« first day (1570 days earlier)      last day (1059 days later) » 

4:39 AM
@AdilMohammed yes, for example the electric field of an electric dipole falls as 1/r³. In fact there are higher inverse laws as well. For example the field from an electric quadrupole falls as 1/r⁴, an octopole falls as 1/r⁵ and so on.
And gravitational tidal forces fall as 1/r³
 
5:25 AM
@JohnRennie, I have a small question regarding magnetic effects of current
 
@Satwik hi :-)
@Satwik What's the question?
 
yes sir, sending
i was going through some previous conversations in which you mentioned that the magnetic field outside a ideal solenoid is not exactly 0, but my book(Griffiths) proves it to be exactly 0, what is the inaccuracy in the proof.
 
Griffiths makes two assumptions in his proof:
1. the solenoid is infinitely long
2. it is so closely wound that the windings can be approximated as loops
In real solenoids those two assumptions don't apply.
For a real solenoid the field outside is approximately zero.
 
ah ok, so it is zero for this very ideal case, not for others.
 
Yes
 
5:40 AM
thank you :-)
@JohnRennie, I guess it is not exactly 0 in real solenoid because in a real solenoid the point that magnetic field outside is exactly parallel to solenoid everywhere(that comes through the assumptions you mentioned) doesn't hold good?
 
@Satwik If you consider a current flowing along a wire the field lines are circles centred on the wire and the field strength falls as 1/r. Yes?
 
Can someone help me with optimizing a coding problem? Hitting memory limit exceeded on dmoj.ca/problem/2spooky4me
 
@JohnRennie yes
 
Now replace that wire with a solenoid. We think of the current as flowing round the solenoid, but the solenoid is a helix so the current flows along the length of the solenoid as well as around it. That means outside the solenoid the field is basically the same as for a wire.
 
oh, ok.
 
5:52 AM
Suppose you have a current I flowing in the wire. For a unit length of the solenoid the length of the wire in the solenoid is 2πrN, where N is the number of turns per unit length.
 
yes
 
So the current measured along the length of the solenoid is I' = I/(2πrN)
i.e. the charge has to flow long a length of wire equal to 2πrN to get one unit of diatance along the axis of the solenoid.
 
hmm yes
 
The field outside will be B = μ₀I'/2πR (where R is the distance from the axis of the solenoid). This is just the usual expression for the field of a straight wire.
So as N ⟶ ∞ we get B ⟶ 0
 
ah yes
 
5:57 AM
When Griffiths says the solenoid is "closely wound" he means N is very large.
 
yes
 
I have seen this question asked in Irodov, though I don't think I have ever seen it asked in the JEE.
 
@JohnRennie A quick qn, during charging is the +ve terminal of dead battery connected to +ve terminal of live battery? y/n
 
@napstablook Yes
 
ok I'll check it out
 
5:58 AM
ah thanks
 
You want current to flow backwards through the dead battery.
 
@JohnRennie ok the potential difference across terminals is greater than emf of the dead cell right?
V=E+ir
 
@napstablook yes
 
@JohnRennie Just one more thing, doesn't the loops in the solenoid make it's magnetic field differ from a simple wire's Magnetic field?
 
@Satwik this is where it matters whether the solenoid is infinite or not. In an infinite solenoid the field lines inside the solenoid never exit the solenoid because the solenoid is infinite and has no ends.
 
6:04 AM
yes
 
In a finite solenoid the field lines do enter the solenoid at one end and exit it at the other end, so they will loop back and form a field outside the solenoid.
 
yes!
 
In effect the solenoid behaves as if it had a magnetic monopole at each end. The longer the solenoid is the farther apart the two "magnetic charges" are and hence the weaker the field between them because the field is more spread out.
 
ah yes
 
@JohnRennie I was reading about mechanism of battery and.. does the size of electrode matter for emf?
If I look at nerst equation that tells me no, but it may have some assumption that makes it independent of size?
 
6:17 AM
Given a closed 2D conducting loop, the terminals of a battery are connected to any 2 points on the loop (not the same point). Is the B field at the geometric center (centroid) of the loop always zero? I've tried for a circle, a square and some arrangements of a rectangle, and it seems to me like it is true, although I'm not sure; is there a proof for it if it is true?
 
@AshishAhuja A less symmetric shape should cover any corner cases I think
 
I think you can make a symmtery argument
 
a = input().split()
spooky = []
j = 0
for b in range(int(a[1])):
    spooky.append(0)
for b in range(int(a[0])):
    c = input().split()
    for d in range(int(c[0]), int(c[1])):
        spooky[d] = spooky[d] + int(c[2])
for b in range(int(a[1])):
    if(spooky[b] < int(a[2])):
        j = j + 1
print(j)
Is there a way to further optimize memory usage?
 
@napstablook do you have an example asymmetrical shape for which it would be easy to check? I've tried an equilateral triangle with the batteries connected to one side and the B is zero for that as well, but it seems too tedious to do it for asymmetric shapes.
@SafdarFaisal $1 \leq L \leq 10^9$. There simply is no way to store an array that large
At least not with a 16M memory limit. I remember trying it on your computer would also hang it up on much older versions of Windows.
 
@AshishAhuja I'm wondering if there is a similarity between the equation for calculating the position of the centroid of the loop and the Biot-Savart equation.
 
6:34 AM
@AshishAhuja seems like a good qn to ask in main site
 
@AshishAhuja How else can we store that information?
 
I have got nothing, I can see it working for different shapes but no idea how it applies in gneral
@JohnRennie can you please tell me if size of electrode matters in a battery?
 
@AshishAhuja what is the equation for the centroid of a loop?
@napstablook it doesn't matter. The EMF is determined by the chemical reaction that occurs in the battery.
I guess the electrode geometry could change the internal resistance so it could change the voltage when a current was flowing, but it won't affect the EMF.
 
@SafdarFaisal you can't; you need to keep track of the $a_i$ and $b_i$ and solve
 
@JohnRennie is internal resistance a geometric property? I think in a dead battery internal resistance would be different from a live one if at all
 
@AshishAhuja I know what a centroid is, but a closed loop is a special case and I can't find an equation for that special case.
 
@JohnRennie isn't the geometric mean of all the (x,y) coordinates simply the centroid? I'm talking about a 2D closed loop
 
@AshishAhuja arithmetic mean
 
yes sorry that's what I meant
 
What I'm thinking is that the Biot-Savart law tells us $$ B \propto \int\frac{d\mathbf s \times \mathbf r}{|\mathbf r|^3} $$
Hmm, wait ...
 
6:48 AM
is this the formula you were looking for? @JohnRennie I think g(x) can be closed function for us?
 
@napstablook suppose the dot is the centroid of the loop, then we can write the expression for the centroid as an integral involving r and ds. What I wondering is if you can show the form of this integral has a relation to the Biot-Savart integral that proves the theorem.
 
@JohnRennie I have an idea sir
consider the small segment ds subtending an angle $d\phi$ at the centroid
i. consider a small yriangular wedge, with two sides=r1 one side= ds1, and vertex angle $d\phi$
and if we extend these two sides to the other side of the loop, we fill ccreate another triangular wedge with sides r2,r2 and ds2. vertex angle is the same, $d\phi$.
then , since ds=r dphi, using biot savart law (and considering the cross product will simply result in multiplic. of magnitudes,):
$$B_{net}= \dfrac{\mu_{0}}{4\pi} \int (I1/r1-I2/r2)d\phi$$
wait no, the limits for both loops will be different
 
7:08 AM
@satan29 is ds=rd\phi a thing for non circular lines? JR's diagram shows that we can't draw a circle centred at centroid with ds being part of it. . .
 
@satan29 Yes, but the current though the two parts is inversely proportional to the arc length i.e. the current is inversely proportional to $\int ds$ along the arc.
 
@napstablook yes. s=rphi isnt true, but ds=rdphi is true. you can use the cosine law and neglect terms like dr^2 and consider sin(dphi)=dphi to prove it.
rigorously, but intuitively it seems obvious
$$ B_{net}= \dfrac{\mu_{0}}{4\pi} \int(I1/r1)d\phi - \int(I2/r2)d\phi $$
but no, this argument will fail too.. it wont completely cover one of the portions..
so the other integral is in $d\phi'$
 
7:50 AM
@AshishAhuja I really think you should ask this question in SE. Better you before someone else! it is a good qn.
 
8:05 AM
@napstablook ok, I'll go ask it now.
 
upvoted
@AshishAhuja btw, are you familiar with openCV?
 
@satan29 did you qualify round one? I saw that there was a AI/ML contest on there opencv.org/opencv-ai-competition-2021/#phase1-winners-list
 
@SafdarFaisal this isnt a codeforces thing
its a project for my club
 
 
1 hour later…
10:10 AM
@JohnRennie Hello
 
@pi-π hi :-)
 
@JohnRennie How do we print the subsets of a given array recursively?
 
 
4 hours later…
2:10 PM
0
Q: Rectangle detection inaccuracy using approxPolyDP() in openCV

satan 29As part of a program , which contains a series of images to be processed, I first need to detect a green coloured rectangle first. I'm trying to write a program that doesn't use colour masking, since the lighting/glare on the images will make it difficult to find the appropriate HSV ranges. (p.s:...

any openCV enthusiast
its a bit urgent
and regardless, please upvote ;)
 
2:26 PM
For entropy . If there is a change from Ti to Tf. Then , in formula of entropy = dq/T.
Which value of T is written.
Also , do we write formula of entropy as 1/T * integral of dq or integral of dq/T
It says in-line that for 2nd case I wrote. It means T which is calculated from initial to final state .
 
@satan29 Are you doing CS engineering?
 
@Wolgwang no
 
EE?
Have you joined some club?
 
@SrijanM.T $$\int_s1^s2 ds= \int _ {T_{i}}^T_{f}\dfrac{dq}{T}$$
$$\int _s_{i}^(s_{f}) ds$$
WTF
 
2:43 PM
@satan29 Double Underscores. _{ _ }
 
$$\int_{s1}^{s2} ds$$
 
$$\int_{s1}^{s2} ds= \int _ {T_{i}}^{T_{f}}\dfrac{dq}{T}$$
 
yes that
 
$$\int_{s_1}^{s_2} \mathrm ds= \int _{T_{i}}^{T_{f}}\dfrac{\mathrm dq}{T}$$
@Wolgwang d upright..
 
@SrijanM.T clearly since T varies , it cant be taken outside the integral sign. If you do, the natural confusion arises : which T?. Hopefully its settled now
If T doesnt change, then you can take it outside the integral sign. But then theres no confusion, since Ti and Tf are identical
and btw, be vary careful: the formula for entropy change is :
$$ds= \dfrac{dq_{rev}}{T}$$
 
3:03 PM
 
@satan29 Why did you write this ?
 
my latex equations weren't formatting and i was already very frustrated
 
@satan29 Thanks as well a lot. Very helpful
 
@satan29 got the answer to your question @ Satan29?
 
@satan29 Ohh.
 
3:13 PM
still waitiing
@SafdarFaisal no :-(
still waitiing
 
@satan29 My tablet doesn’t read latex since it uses safari. Don’t worry too much next time.
 
Its the last thing I need to do for the project, I will be all done after that
 
@satan29 there is an answer to your qn though have you seen it?
 
@napstablook ++
 
wait what
ohh indeed
I didnt refresh
well lemme have a look
 
3:15 PM
@SafdarFaisal ?
 
hes agreeing wiith you..
 
oh okay lmao
 

« first day (1570 days earlier)      last day (1059 days later) »