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

tactic: apply integral_eq_sub_of_hasDerivAt
state_before: a✝ b✝ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a b : ℝ
⊢ (∫ (x : ℝ) in a..b, Complex.cos (z * ↑x)) = Complex.sin (z * ↑b) / z - Complex.sin (z * ↑a) / z

tactic: swap
state_before: case hderiv
a✝ b✝ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a b : ℝ
⊢ ∀ (x : ℝ), x ∈ [[a, b]] → HasDerivAt (fun b => Complex.sin (z * ↑b) / z) (Complex.cos (z * ↑x)) x

case hint
a✝ b✝ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a b : ℝ
⊢ IntervalIntegrable (fun y => Complex.cos (z * ↑y)) MeasureTheory.volume a b

tactic: intro x _
state_before: case hderiv
a✝ b✝ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a b : ℝ
⊢ ∀ (x : ℝ), x ∈ [[a, b]] → HasDerivAt (fun b => Complex.sin (z * ↑b) / z) (Complex.cos (z * ↑x)) x

tactic: have a := Complex.hasDerivAt_sin (↑x * z)
state_before: case hderiv
a✝¹ b✝ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a b x : ℝ
a✝ : x ∈ [[a, b]]
⊢ HasDerivAt (fun b => Complex.sin (z * ↑b) / z) (Complex.cos (z * ↑x)) x

tactic: have b : HasDerivAt (fun y => y * z : ℂ → ℂ) z ↑x := hasDerivAt_mul_const _
state_before: case hderiv
a✝² b✝ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a✝¹ b x : ℝ
a✝ : x ∈ [[a✝¹, b]]
a : HasDerivAt Complex.sin (Complex.cos (↑x * z)) (↑x * z)
⊢ HasDerivAt (fun b => Complex.sin (z * ↑b) / z) (Complex.cos (z * ↑x)) x

tactic: have c : HasDerivAt (fun y : ℂ => Complex.sin (y * z)) _ ↑x := HasDerivAt.comp (𝕜 := ℂ) x a b
state_before: case hderiv
a✝² b✝¹ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a✝¹ b✝ x : ℝ
a✝ : x ∈ [[a✝¹, b✝]]
a : HasDerivAt Complex.sin (Complex.cos (↑x * z)) (↑x * z)
b : HasDerivAt (fun y => y * z) z ↑x
⊢ HasDerivAt (fun b => Complex.sin (z * ↑b) / z) (Complex.cos (z * ↑x)) x

tactic: have d := HasDerivAt.comp_ofReal (c.div_const z)
state_before: case hderiv
a✝² b✝¹ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a✝¹ b✝ x : ℝ
a✝ : x ∈ [[a✝¹, b✝]]
a : HasDerivAt Complex.sin (Complex.cos (↑x * z)) (↑x * z)
b : HasDerivAt (fun y => y * z) z ↑x
c : HasDerivAt (fun y => Complex.sin (y * z)) (Complex.cos (↑x * z) * z) ↑x
⊢ HasDerivAt (fun b => Complex.sin (z * ↑b) / z) (Complex.cos (z * ↑x)) x

tactic: simp only [mul_comm] at d
state_before: case hderiv
a✝² b✝¹ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a✝¹ b✝ x : ℝ
a✝ : x ∈ [[a✝¹, b✝]]
a : HasDerivAt Complex.sin (Complex.cos (↑x * z)) (↑x * z)
b : HasDerivAt (fun y => y * z) z ↑x
c : HasDerivAt (fun y => Complex.sin (y * z)) (Complex.cos (↑x * z) * z) ↑x
d : HasDerivAt (fun y => Complex.sin (↑y * z) / z) (Complex.cos (↑x * z) * z / z) x
⊢ HasDerivAt (fun b => Complex.sin (z * ↑b) / z) (Complex.cos (z * ↑x)) x

tactic: convert d using 1
state_before: case hderiv
a✝² b✝¹ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a✝¹ b✝ x : ℝ
a✝ : x ∈ [[a✝¹, b✝]]
a : HasDerivAt Complex.sin (Complex.cos (↑x * z)) (↑x * z)
b : HasDerivAt (fun y => y * z) z ↑x
c : HasDerivAt (fun y => Complex.sin (y * z)) (Complex.cos (↑x * z) * z) ↑x
d : HasDerivAt (fun y => Complex.sin (z * ↑y) / z) (z * Complex.cos (z * ↑x) / z) x
⊢ HasDerivAt (fun b => Complex.sin (z * ↑b) / z) (Complex.cos (z * ↑x)) x

tactic: conv_rhs => arg 1; rw [mul_comm]
state_before: case h.e'_7
a✝² b✝¹ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a✝¹ b✝ x : ℝ
a✝ : x ∈ [[a✝¹, b✝]]
a : HasDerivAt Complex.sin (Complex.cos (↑x * z)) (↑x * z)
b : HasDerivAt (fun y => y * z) z ↑x
c : HasDerivAt (fun y => Complex.sin (y * z)) (Complex.cos (↑x * z) * z) ↑x
d : HasDerivAt (fun y => Complex.sin (z * ↑y) / z) (z * Complex.cos (z * ↑x) / z) x
⊢ Complex.cos (z * ↑x) = z * Complex.cos (z * ↑x) / z

tactic: rw [mul_div_cancel _ hz]
state_before: case h.e'_7
a✝² b✝¹ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a✝¹ b✝ x : ℝ
a✝ : x ∈ [[a✝¹, b✝]]
a : HasDerivAt Complex.sin (Complex.cos (↑x * z)) (↑x * z)
b : HasDerivAt (fun y => y * z) z ↑x
c : HasDerivAt (fun y => Complex.sin (y * z)) (Complex.cos (↑x * z) * z) ↑x
d : HasDerivAt (fun y => Complex.sin (z * ↑y) / z) (z * Complex.cos (z * ↑x) / z) x
⊢ Complex.cos (z * ↑x) = Complex.cos (z * ↑x) * z / z

tactic: apply Continuous.intervalIntegrable
state_before: case hint
a✝ b✝ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a b : ℝ
⊢ IntervalIntegrable (fun y => Complex.cos (z * ↑y)) MeasureTheory.volume a b

tactic: exact Complex.continuous_cos.comp (continuous_const.mul Complex.continuous_ofReal)
state_before: case hint.hu
a✝ b✝ : ℝ
n : ℕ
z : ℂ
hz : z ≠ 0
a b : ℝ
⊢ Continuous fun y => Complex.cos (z * ↑y)