Theorem: integral_mul_cpow_one_add_sq
File: Mathlib/Analysis/SpecialFunctions/Integrals.lean

tactic: have : t + 1 ≠ 0 := by contrapose! ht; rwa [add_eq_zero_iff_eq_neg] at ht
state_before: a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
⊢ (∫ (x : ℝ) in a..b, ↑x * (1 + ↑x ^ 2) ^ t) =
    (1 + ↑b ^ 2) ^ (t + 1) / (↑2 * (t + 1)) - (1 + ↑a ^ 2) ^ (t + 1) / (2 * (t + 1))

tactic: apply integral_eq_sub_of_hasDerivAt
state_before: a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
⊢ (∫ (x : ℝ) in a..b, ↑x * (1 + ↑x ^ 2) ^ t) =
    (1 + ↑b ^ 2) ^ (t + 1) / (↑2 * (t + 1)) - (1 + ↑a ^ 2) ^ (t + 1) / (2 * (t + 1))

tactic: contrapose! ht
state_before: a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
⊢ t + 1 ≠ 0

tactic: rwa [add_eq_zero_iff_eq_neg] at ht
state_before: a b : ℝ
n : ℕ
t : ℂ
ht : t + 1 = 0
⊢ t = -1

tactic: intro x _
state_before: case hderiv
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
⊢ ∀ (x : ℝ), x ∈ [[a, b]] → HasDerivAt (fun {b} => (1 + ↑b ^ 2) ^ (t + 1) / (↑2 * (t + 1))) (↑x * (1 + ↑x ^ 2) ^ t) x

tactic: have g :
  ∀ {z : ℂ}, 0 < z.re → HasDerivAt (fun z => z ^ (t + 1) / (2 * (t + 1))) (z ^ t / 2) z := by
  intro z hz
  convert (HasDerivAt.cpow_const (c := t + 1) (hasDerivAt_id _)
    (Or.inl hz)).div_const (2 * (t + 1)) using 1
  field_simp
  ring
state_before: case hderiv
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
⊢ HasDerivAt (fun {b} => (1 + ↑b ^ 2) ^ (t + 1) / (↑2 * (t + 1))) (↑x * (1 + ↑x ^ 2) ^ t) x

tactic: convert (HasDerivAt.comp (↑x) (g _) f).comp_ofReal using 1
state_before: case hderiv
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
g : ∀ {z : ℂ}, 0 < z.re → HasDerivAt (fun z => z ^ (t + 1) / (2 * (t + 1))) (z ^ t / 2) z
⊢ HasDerivAt (fun {b} => (1 + ↑b ^ 2) ^ (t + 1) / (↑2 * (t + 1))) (↑x * (1 + ↑x ^ 2) ^ t) x

tactic: convert (hasDerivAt_pow 2 (x : ℂ)).const_add 1
state_before: a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
⊢ HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x

tactic: norm_cast
state_before: case h.e'_6.h.h.e'_5
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
x✝ : ℂ
⊢ ↑1 = 1

tactic: simp
state_before: case h.e'_7.h.e'_6
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
⊢ ↑x = ↑x ^ (2 - 1)

tactic: intro z hz
state_before: a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
⊢ ∀ {z : ℂ}, 0 < z.re → HasDerivAt (fun z => z ^ (t + 1) / (2 * (t + 1))) (z ^ t / 2) z

tactic: convert (HasDerivAt.cpow_const (c := t + 1) (hasDerivAt_id _)
  (Or.inl hz)).div_const (2 * (t + 1)) using 1
state_before: a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
z : ℂ
hz : 0 < z.re
⊢ HasDerivAt (fun z => z ^ (t + 1) / (2 * (t + 1))) (z ^ t / 2) z

tactic: field_simp
state_before: case h.e'_7
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
z : ℂ
hz : 0 < z.re
⊢ z ^ t / 2 = (t + 1) * id z ^ (t + 1 - 1) * 1 / (2 * (t + 1))

tactic: ring
state_before: case h.e'_7
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
z : ℂ
hz : 0 < z.re
⊢ z ^ t * (2 * (t + 1)) = (t + 1) * z ^ t * 2

tactic: simp
state_before: case h.e'_6
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
g : ∀ {z : ℂ}, 0 < z.re → HasDerivAt (fun z => z ^ (t + 1) / (2 * (t + 1))) (z ^ t / 2) z
⊢ (fun {b} => (1 + ↑b ^ 2) ^ (t + 1) / (↑2 * (t + 1))) = fun y =>
    ((fun z => z ^ (t + 1) / (2 * (t + 1))) ∘ fun y => ↑1 + y ^ 2) ↑y

tactic: field_simp
state_before: case h.e'_7
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
g : ∀ {z : ℂ}, 0 < z.re → HasDerivAt (fun z => z ^ (t + 1) / (2 * (t + 1))) (z ^ t / 2) z
⊢ ↑x * (1 + ↑x ^ 2) ^ t = (↑1 + ↑x ^ 2) ^ t / 2 * (2 * ↑x)

tactic: ring
state_before: case h.e'_7
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
g : ∀ {z : ℂ}, 0 < z.re → HasDerivAt (fun z => z ^ (t + 1) / (2 * (t + 1))) (z ^ t / 2) z
⊢ ↑x * (1 + ↑x ^ 2) ^ t * 2 = (1 + ↑x ^ 2) ^ t * (2 * ↑x)

tactic: exact_mod_cast add_pos_of_pos_of_nonneg zero_lt_one (sq_nonneg x)
state_before: case hderiv
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
x : ℝ
a✝ : x ∈ [[a, b]]
f : HasDerivAt (fun y => ↑1 + y ^ 2) (2 * ↑x) ↑x
g : ∀ {z : ℂ}, 0 < z.re → HasDerivAt (fun z => z ^ (t + 1) / (2 * (t + 1))) (z ^ t / 2) z
⊢ 0 < (↑1 + ↑x ^ 2).re

tactic: apply Continuous.intervalIntegrable
state_before: case hint
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
⊢ IntervalIntegrable (fun y => ↑y * (1 + ↑y ^ 2) ^ t) MeasureTheory.volume a b

tactic: refine' continuous_ofReal.mul _
state_before: case hint.hu
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
⊢ Continuous fun y => ↑y * (1 + ↑y ^ 2) ^ t

tactic: apply Continuous.cpow
state_before: case hint.hu
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
⊢ Continuous fun y => (1 + ↑y ^ 2) ^ t

tactic: exact continuous_const.add (continuous_ofReal.pow 2)
state_before: case hint.hu.hf
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
⊢ Continuous fun x => 1 + ↑x ^ 2

tactic: exact continuous_const
state_before: case hint.hu.hg
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
⊢ Continuous fun x => t

tactic: intro a
state_before: case hint.hu.h0
a b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
⊢ ∀ (a : ℝ), 0 < (1 + ↑a ^ 2).re ∨ (1 + ↑a ^ 2).im ≠ 0

tactic: rw [add_re, one_re, ← ofReal_pow, ofReal_re]
state_before: case hint.hu.h0
a✝ b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
a : ℝ
⊢ 0 < (1 + ↑a ^ 2).re ∨ (1 + ↑a ^ 2).im ≠ 0

tactic: exact Or.inl (add_pos_of_pos_of_nonneg zero_lt_one (sq_nonneg a))
state_before: case hint.hu.h0
a✝ b : ℝ
n : ℕ
t : ℂ
ht : t ≠ -1
this : t + 1 ≠ 0
a : ℝ
⊢ 0 < 1 + a ^ 2 ∨ (1 + ↑(a ^ 2)).im ≠ 0