devops – Is Continuous Integration nowadays intended as “Continuous Inspection”?

I’ve been reading a log about CI (mostly Addison-Wesley books) and taking “CI” courses. I see two clear distinctions between old books on CI and new ones:

  • Old ones focus on “committing” or “pushing” your code often (integrating often)
  • New ones talk about practices for having feedback early in the process, like running builds and tests in a pull request instance.

I think it’s not common nowadays to commit or push every day (or multiple times per day), but it’s a great practice to build and run tests in every pull request. Is it still Continuous Integration? Or am I missing something?

integration – Stuck at an integral

So I’m trying to find a volume of a surface and a cylinder. I managed to do it with cylindrical coordinates. But I wanted to try to without it, but the integral is seriously hard. So the integral was

$$V=int^2_{-2}int^sqrt{4-x^2}_{-sqrt{4-x^2}}int^{4-x^2}_0dzdydz$$

Using the symmetri and the fact that our function is even

$$V=4int^2_0int^sqrt{4-x^2}int^{4-x^2}_0dzdydx$$

I manged the last part

$$V=4int^2_0(4-x^2)left(sqrt{4-x^2}right)dx$$

I first used integration by parts where $u = (4-x^2)^{frac{3}{2}}$and $dv=1$ and ended up with
$$I = 4left(xleft(4-x^2right)^{frac{3}{2}}-int-3x^2sqrt{4-x^2}dxright)$$

This is where I’m stuck, clearly u-substitution wouldn’t work. Some help would be greatly appreciated!

differential equations – How to integrate ParametricNDSolve solution and solve for parameter based on integration result

I have a second-order ODE that depends on a parameter $rho_0$. For a given $rho_0$, I can use NDSolve or ParametricNDSolve to get the solution $y(r; rho_0)$ very easily, but I want to solve for the value of $rho_0$ that satisfies the following (admittedly complicated) condition:
$$4pirho_0int_0^Rr^2 e^{-y(r; rho_0)} dr = M $$
where M and R are given.

I’ve tried doing this several different ways, using different combinations of (Parametric)NDSolve(Value), NSolve, and FindRoot, and trying solutions from several related posts on here, but I just can’t get it to work. Here’s one such trial:

sol = ParametricNDSolveValue(
{y''(x) + 2/x * y'(x) == (chi(rho0) * y'(x)^2 + 1)/(chi(rho0) + Exp(y(x))), 
 y(ibc) == 0, y'(ibc) == 0}, y, {x, ibc, obc}, {rho0})


FindRoot((4 Pi * rho0 * 
         NIntegrate( r^2 * Exp( -sol(rho)(r/r0(rho)) /. rho -> rho0 ), {r, 0, R} ) 
         - M), {rho0, rho0guess})

where rho0guess, chi, and r0 are all defined in advance. When I run this, I get the following error message

NIntegrate::inumr: The integrand E^-ParametricFunction(1,Internal`Bag(<1>),0,1,{<<1>>},{NDSolve`base$189416,NDSolve`NDSolveParametricFunction(0,<<8>>,All)})(rho0)(<<1>>/Sqrt(<<1>>)) r^2 has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,95.908}}.

I think the problem is that NIntegrate is trying to evaluate the solution before a value for rho0 is passed to the solution by FindRoot, and so it’s failing to integrate because rho0 doesn’t have a numerical value yet. I just can’t figure out how to get around this.

Any help is much appreciated!

EDIT: Here are some typical values of the various parameters and functions

GAU = 4.3*10^-6;
rhobAU = 135.3;

M = 10^11;
R = (M/(4 Pi/3*200*rhobAU))^(1/3);

R0 = 4;
kTm = GAU*M/R/2;
r0(rho0_) := Sqrt(kTm/(4 Pi*GAU*rho0))
chi(rho0_) := R0^2/(Pi^2*r0(rho0)^2)

rho0guess = 10^8;

Integration of compactly supported forms

Now that school is over I do not feel bad asking questions here. I did not really understand the relationship between integration of forms and differentiation. I was asked to prove that a compactly supported k-form w on $R^k$ is the exterior derivative of a compactly supported k-1 form if and only if $int_{R^k} w = 0$. I thought the reverse direction could be solved by stokes theorem but now i am not sure. Not to mention that I dont know how to do the forward direction. I have considered projection w onto the k-sphere to get some w’ and we know w’=dv for some v on the sphere by a lemma from lecture. I dont know if this helps.

numerical integration – NIntegrate::slwcon and NIntegrate::eincr:

I have the following code to evaluate the double integral of which the integrand contains summations.

a = 1.1798710705178221747709894550582188967078238417029640017201995589
3552025364542807472418914015859414022112280461408148970194496741533076
882157607415223127492391019655558195361182929703459`158.
94383771058207*^12;
b = 2.26562500;
c = 1.81505148861869`*^-11;
d = 23.662621294619998242971428558039280847039065920403134745951781161
6604691248947208857758189787681405721656941282488226858308051995862227
03295794982365258929783937779449526906107493517940605539567`157.
52081186501843;
f = 3.9762816693358413444242383928332521659243792714105963808597582172
1677895928488587525623222082345413892578490996192857648555810218065386
055620034160228548784193009119494778657256763`157.54308182919476*^-13;
g = 3.1306512217343699049816678338611844042940126102861569115946355055
2379739233549991684436932580097276616360046758705039003579253070583704
87306284924487233677956546263347280851687424`154.55339124819713*^-283;
h = 0.4663677854613281996964274099654771725449995576718401982649626901
4979290048497524493727931929716644258598652635846126429619061653535457
7552234258390027879122494699655811617457309249292766647653`158.
10068151409945;
k = 1.7400621010179746539715325376531540776673407694803313887835074772
7621820290231417060167325520004426731623808979659285973341841054088991
377348701663084581319054270584192856482987849`158.6501729599253*^-13;
L = 12;
p = 1.7267086550014064377504396122758581898174212801982663320383980364
4189130935666171318482175845230982997098739340274603421154239660049599
7742129919272319043201530223139294218906027174185411646792`156.
9155606199771*^-19;
m = {193.1974795021252244647940778330697265346831202988930438449952777
2307847128160223047093925434704114309184915713826376925945458184231453
466263054478004310746486964933973801043322`148.30510799763482, 
-1.9831415769102246753169203737597186440257929720747405282387824878992
6107613692269553118408251584641941543185280916783314001387339467872143
8413408725537146318896037644145`148.23545499521762*^14, 
   9.27130443465927962680463415680935518438025048895563739033406430779
2196012034144989441708086252518980765588393670969227402958335184629953
81754195556168420354856191202632726995515843`148.1802144267804*^25, 
-2.5800039865768300579393918422060974207019853041395228305982709910784
5385543803983822395718755270344540849858353480555085709766499883993525
5692481465734198491137803554398276`148.1336524600536*^37, 
   4.74051682958982877757253604628388253288384781482056602069781764081
9228970772949442973000148032178390675200697268768942345714056423740914
80354727904019873987134563343319805735897818842`148.09340643440623*^
48, -6.045696336170963761979351988393444721239513638248359564313546590
9718715772107181860271630911859080048890550740293482441710924532226834
88785001561949827887583104602354991010789`148.05796717887392*^59, 
   5.48169129849067708749576724703553417939408966217748199411635112509
3975998785626154086737477706943924734870295242554891109862338634996706
52881122759735494841981860519139551755923247573972`148.02635144833272*^
70, -3.558859598535019932696238577795555409895936844852263611105033721
0375255058472565008180720204152692875351619018996231358541261075464815
50993035152346687208320263348602766130493464`147.99786882797923*^81, 
   1.64170225303118668483536395284823903373718786459586837660122032491
6095608079033229473848757844731529141963765405064759781082803855127965
2691286574811194198800983167974295`147.97199851695797*^92, 
-5.2480764106579160571712590401723827187713866001169686217276690968556
0720450830001550831782374704062930304936342651979107670945180568135634
934777787696977134688463363076848049109484`147.94833381460728*^102, 
   1.10376762837378400256596151856877143314949611822933817186964398056
6513468174587221258709945187779831909161277645871738123234551311287274
78355158886780258679136222861840141`147.92655298710872*^113, 
-1.3717147483659623561567398067035113741497860704561052158773749470395
4451131015780543446068263484385374754209550914285685014429230059159675
6883122631756455319026263237240593696821711`147.9063994508292*^123, 
   7.62038321127089845343261988865253586612439689357390721954186078231
7745858168312353448416091122119241968300105088661006951809593285174538
28785418554487594420138798900387611`147.8876665311791*^132};
n = {1.355573243087520514288089562497260829417934974879258545226394709
1581632390251949362448991535838854387828992200011014212046924115116342
36774361520751754411719411168290762941843303838260921034729`154.
7068137372351, 
-1.0245928740767489003861056984284775651988428602209840685472503196463
8795930234592796835719935424571882137914261342592202874852760076112574
416630451012360208651254471215128194043516110717`153.94630606168067*^
13, 8.9274486445716723149532799214464202934486639009370371697876732811
7309338540881124740225222195651232772519644118676062290969039522944619
182163951555475885638710858185564149165684843`153.80921876999915*^25, 
-3.6759676683395569226361903550968200824615587798139936187422973093672
7524993405149619110906669196324634865139505465691286936359213505175950
82648234290038347371835858805085681`153.70951619258835*^38, 
   8.46890235524130159449486145084290474315429938343042316420562067986
2851660903090850781750760926753333681142269036924244448156733221457952
7284650316472932006583589556818127479776452351575`153.63641768743574*^
50, -1.183963727932234048419892914574504119691001960215443363374579536
6221799023716788793836145690916125278181883509910251692260914506526151
991183549806618069041478638356123410370047646`153.58049547400296*^63, 
   1.05061217672427573937875620745709379002627336725498531970829595877
3024659127091166260173635393986216201350663927669330845944472454001554
7653381517564746234073087737793092403156290468681009911`153.
53584270924242*^75, 
-6.0584630947562597856380562413442419518448978885525607665447920472335
7004600791968921362280443938576083533065571634125571548632808959929629
790577441227915620375110110148244720464105958`153.4990714580894*^86, 
   2.28274980013156097133562209543324362618017404654189411106310354580
1316698809067147502956432483851929920100534744472639286623024080167418
0951137035977035828949374744764910684041`153.46810663882243*^98, 
-5.5393276975669543411312359391170032422891499208542799478529688449103
0657737312682644055014461777520413955788265776706075897708285932473509
487959913970225597988826267142550230756354142547`153.44158425404342*^
109, 8.289929266459807127028509719838011396311076683133447742366507269
1426222477306422877783169874953638427457706706377785690078513120930488
09383654486564976662124022080955027406652237`153.41855789644956*^120, 
-6.9209387452305809520831335905017476070978872825599662420473808654194
8931991860905633911584754872433560379615186289074673651242807441129188
233340512050802389488222073074566318608837938629357`153.
39834390904957*^131, 
   2.45300100486846411742403054500030433066570931665654433746550128485
1080592792054839789289213596711427047642684395418250860055631043057336
48562402527422622838036053732378834470177372`153.3804328940518*^142};
NIntegrate(!(
*UnderoverscriptBox(((Sum)), (i = 0), (98))(
*FractionBox((
*SuperscriptBox(((a*x + b)), (i))*
     Exp((-((a*x + b))))), (i!)) (
*UnderoverscriptBox(((Sum)), (i = 0), (L))
*FractionBox((
*SuperscriptBox(((y + x - c)), (d)) Exp((-((y + x - c)))/
         f) ((m(((i + 1))) 
*SuperscriptBox(((y + x - c)), (i))))), (g)) (
*UnderoverscriptBox(((Sum)), (i = 0), (L))
*FractionBox((
*SuperscriptBox((y), (h)) Exp((-y)/k) ((n(((i + 1))) 
*SuperscriptBox((y), (i))))), (p)))))), {x, c, 
  Infinity}, {y, 0, Infinity}, 
 Method -> {"GlobalAdaptive", "MaxErrorIncreases" -> 4000}, 
 MinRecursion -> 10, MaxRecursion -> 30)

However, I get two error messages, which are

  1. NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small.

  2. NIntegrate::eincr: The global error of the strategy GlobalAdaptive has increased more than 4000 times. The global error is expected to decrease monotonically after a number of integrand evaluations. Suspect one of the following: the working precision is insufficient for the specified precision goal; the integrand is highly oscillatory or it is not a (piecewise) smooth function; or the true value of the integral is 0. Increasing the value of the GlobalAdaptive option MaxErrorIncreases might lead to a convergent numerical integration. NIntegrate obtained 0.9999763600200141and 0.0000461755863201869 for the integral and error estimates.

I have tried to increase MaxErrorIncreases to 20000. However, the above two error messages still exist. Why these errors happen? Is there a method to fix these issues?

integration – Computing $displaystyle int_{0}^{1} x^2 sin(2pi nx)sin(2pi mx) dx$.

I would like to know if there is any easy way or known formula to compute the following integral. For $n,m in mathbb{N}$, for $n neq m$, $displaystyle int_{0}^{1} x^2 sin(2pi nx)sin(2pi mx) dx$. I tried various graphs for $nne m$, and it seems the answer is $0$. That’s why I thought there might easy way to deal with this. Thanks.

Problem with Integration – Mathematica Stack Exchange

I want to integrate a function which seems to have no regularity problems. In fact I have defined

K(x_, y_) := 
 Assuming(Element({x, y}, Reals) && x > 0 && y > 0, 
 NIntegrate(Sqrt(1 - (Cos(x)*Cos(y) + Sin(x)*Sin(y)*Cos(t))^2), {t, 0, 2*Pi}))
R(x_, 0) := (x - Pi/2)^2
H(x_, 0) := 
 Assuming(Element({x}, Reals) && x > 0, NIntegrate(Sin(t)*K(x, t)*R(t, 0), {t, 0, Pi}))

If I plot, the function I obtain a good output

Sin(x)*Exp(-10*H(x, 0)

enter image description here

But if I try to integrate it, even with NIntegrate I receive the following error messages

NIntegrate::inumr: The integrand Sqrt(1-(Cos(t) Cos(x)+Cos(t) Sin(t) Sin(x))^2) has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,6.28319}}.
General::stop: Further output of NIntegrate::inumr will be suppressed during this calculation.
NIntegrate::write: Tag Times in -Abs(t) is Protected.
General::stop: Further output of NIntegrate::write will be suppressed during this calculation.
NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in x near {x} = {0.0217285}. NIntegrate obtained 2.897189900542515`*^-18 and 3.722470516152078`*^-24 for the integral and error estimates.

why is that?

calculus – Need help in understanding the integration part of this question

Thanks for contributing an answer to Mathematics Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.