@@ -5,7 +5,8 @@ From mathcomp Require Import interval rat.
5
5
From mathcomp Require Import mathcomp_extra boolp classical_sets functions.
6
6
From mathcomp Require Import reals ereal nsatz_realtype interval_inference.
7
7
From mathcomp Require Import topology normedtype landau sequences derive.
8
- From mathcomp Require Import realfun exp.
8
+ From mathcomp Require Import realfun exp measure lebesgue_measure.
9
+ From mathcomp Require Import lebesgue_integral ftc.
9
10
10
11
(**md************************************************************************* *)
11
12
(* # Theory of trigonometric functions *)
@@ -1083,6 +1084,33 @@ HB.lock Definition atan {R : realType} (x : R) : R :=
1083
1084
get [set y | -(pi / 2) < y < pi / 2 /\ tan y = x].
1084
1085
Canonical locked_atan := Unlockable atan.unlock.
1085
1086
1087
+ Section oneDsqr.
1088
+ Context {R : realType}.
1089
+ Implicit Type x : R.
1090
+
1091
+ Definition oneDsqr x : R := 1 + x ^+ 2.
1092
+
1093
+ Lemma oneDsqr_ge1 x : 1 <= oneDsqr x :> R.
1094
+ Proof . by rewrite lerDl sqr_ge0. Qed .
1095
+
1096
+ #[local]
1097
+ Hint Extern 0 (is_true (1 <= oneDsqr _)) => solve[apply: oneDsqr_ge1] : core.
1098
+
1099
+ Canonical oneDsqr_inum x : {itv R & `[1, +oo[} := @ItvReal R (oneDsqr x)
1100
+ (BLeft 1%Z) (BInfty _ false) (oneDsqr_ge1 x) erefl.
1101
+
1102
+ Lemma oneDsqrV_le1 x : oneDsqr\^-1 x <= 1. Proof . by rewrite invf_le1. Qed .
1103
+
1104
+ Lemma continuous_oneDsqr : continuous oneDsqr.
1105
+ Proof . by move=> x; apply: cvgD; [exact: cvg_cst|exact: exprn_continuous]. Qed .
1106
+
1107
+ Lemma continuous_oneDsqrV : continuous (oneDsqr\^-1).
1108
+ Proof . by move=> x; apply: cvgV => //; exact: continuous_oneDsqr. Qed .
1109
+
1110
+ End oneDsqr.
1111
+ #[global]
1112
+ Hint Extern 0 (is_true (1 <= oneDsqr _)) => solve [apply: oneDsqr_ge1] : core.
1113
+
1086
1114
Section Atan.
1087
1115
Variable R : realType.
1088
1116
Implicit Type x : R.
@@ -1230,4 +1258,36 @@ rewrite tanK// in_itv/= xpi2 andbT (lt_le_trans _ x0)//.
1230
1258
by rewrite ltrNl oppr0 divr_gt0// pi_gt0.
1231
1259
Qed .
1232
1260
1261
+ Let mu := @lebesgue_measure R.
1262
+
1263
+ Lemma integral0_oneDsqr b : 0 <= b ->
1264
+ \int[mu]_(x in `[0, b]) (oneDsqr x)^-1 = atan b.
1265
+ Proof .
1266
+ rewrite le_eqVlt => /predU1P[<-|b0].
1267
+ by rewrite set_itv1 Rintegral_set1 atan0.
1268
+ rewrite /Rintegral (@continuous_FTC2 _ _ atan)//.
1269
+ - by rewrite atan0 sube0.
1270
+ - by apply: continuous_in_subspaceT => x ?; exact: continuous_oneDsqrV.
1271
+ - split.
1272
+ + by move=> x _; exact: derivable_atan.
1273
+ + by apply: cvg_at_right_filter; exact: continuous_atan.
1274
+ + by apply: cvg_at_left_filter; exact: continuous_atan.
1275
+ - move=> x x01.
1276
+ by rewrite derive1_atan// mul1r.
1277
+ Qed .
1278
+
1279
+ Lemma integral0y_oneDsqr :
1280
+ (\int[mu]_(x in `[0%R, +oo[) (oneDsqr x)^-1%:E = (pi / 2)%:E)%E.
1281
+ Proof .
1282
+ rewrite (ge0_continuous_FTC2y _ _ cvgy_atan)/=.
1283
+ - by rewrite atan0 oppr0 addr0.
1284
+ - by move=> x _; rewrite invr_ge0.
1285
+ - apply/continuous_within_itvcyP; split.
1286
+ by move=> x x0; apply: continuous_oneDsqrV.
1287
+ by apply: cvg_at_right_filter; exact: continuous_oneDsqrV.
1288
+ - move=> x x0; apply: ex_derive.
1289
+ - by apply: cvg_at_right_filter; exact: continuous_atan.
1290
+ - by move=> x _; rewrite derive1E; exact: derive_val.
1291
+ Qed .
1292
+
1233
1293
End Atan.
0 commit comments