[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.14495040 [View]
File: 118 KB, 485x500, 1502289469186.png [View same] [iqdb] [saucenao] [google]
14495040

Given the equation [math]O(q) -4.25 = 0[/math], I have to find the roots q to this equation using scipy.optimize.fsolve().

[eqn]O(q) = (R+r)\cdot\int_{0}^{2\pi}\sqrt{q^2 + 2q\cos(c\theta + \theta) + 1}\ d\theta[/eqn]
I'm given R, r, and c. They're all constants.
How do I go about this? I honestly don't understand, do I have to integrate while keeping the q as an unknown?
If so then I tried integrating by parts and ended up with:
[eqn]\frac{2}{3}\cdot\left(2\pi(q+1) + \frac{2\sqrt{2\pi}}{5}\cdot \cos\left(\frac{2\pi -q^2 -1}{2q}\right)\right)[/eqn]
Which I then turned into code and plugged into the scipy method but I keep getting wrong answers. What am I doing wrong?

Navigation
View posts[+24][+48][+96]