2508 assumes f: "(f ---> a) F" and g: "(g ---> b) F" and a: "a \<noteq> 0" |
2508 assumes f: "(f ---> a) F" and g: "(g ---> b) F" and a: "a \<noteq> 0" |
2509 shows "((\<lambda>x. f x powr g x) ---> a powr b) F" |
2509 shows "((\<lambda>x. f x powr g x) ---> a powr b) F" |
2510 unfolding powr_def |
2510 unfolding powr_def |
2511 proof (rule filterlim_If) |
2511 proof (rule filterlim_If) |
2512 from f show "((\<lambda>x. 0) ---> (if a = 0 then 0 else exp (b * ln a))) (inf F (principal {x. f x = 0}))" |
2512 from f show "((\<lambda>x. 0) ---> (if a = 0 then 0 else exp (b * ln a))) (inf F (principal {x. f x = 0}))" |
2513 by simp (auto simp: filterlim_iff eventually_inf_principal elim: eventually_elim1 dest: t1_space_nhds) |
2513 by simp (auto simp: filterlim_iff eventually_inf_principal elim: eventually_mono dest: t1_space_nhds) |
2514 qed (insert f g a, auto intro!: tendsto_intros intro: tendsto_mono inf_le1) |
2514 qed (insert f g a, auto intro!: tendsto_intros intro: tendsto_mono inf_le1) |
2515 |
2515 |
2516 lemma continuous_powr: |
2516 lemma continuous_powr: |
2517 assumes "continuous F f" |
2517 assumes "continuous F f" |
2518 and "continuous F g" |
2518 and "continuous F g" |
2542 assumes f: "(f ---> a) F" and g: "(g ---> b) F" and f_nonneg: "\<forall>\<^sub>F x in F. 0 \<le> f x" and b: "0 < b" |
2542 assumes f: "(f ---> a) F" and g: "(g ---> b) F" and f_nonneg: "\<forall>\<^sub>F x in F. 0 \<le> f x" and b: "0 < b" |
2543 shows "((\<lambda>x. f x powr g x) ---> a powr b) F" |
2543 shows "((\<lambda>x. f x powr g x) ---> a powr b) F" |
2544 unfolding powr_def |
2544 unfolding powr_def |
2545 proof (rule filterlim_If) |
2545 proof (rule filterlim_If) |
2546 from f show "((\<lambda>x. 0) ---> (if a = 0 then 0 else exp (b * ln a))) (inf F (principal {x. f x = 0}))" |
2546 from f show "((\<lambda>x. 0) ---> (if a = 0 then 0 else exp (b * ln a))) (inf F (principal {x. f x = 0}))" |
2547 by simp (auto simp: filterlim_iff eventually_inf_principal elim: eventually_elim1 dest: t1_space_nhds) |
2547 by simp (auto simp: filterlim_iff eventually_inf_principal elim: eventually_mono dest: t1_space_nhds) |
2548 next |
2548 next |
2549 { assume "a = 0" |
2549 { assume "a = 0" |
2550 with f f_nonneg have "LIM x inf F (principal {x. f x \<noteq> 0}). f x :> at_right 0" |
2550 with f f_nonneg have "LIM x inf F (principal {x. f x \<noteq> 0}). f x :> at_right 0" |
2551 by (auto simp add: filterlim_at eventually_inf_principal le_less |
2551 by (auto simp add: filterlim_at eventually_inf_principal le_less |
2552 elim: eventually_elim1 intro: tendsto_mono inf_le1) |
2552 elim: eventually_mono intro: tendsto_mono inf_le1) |
2553 then have "((\<lambda>x. exp (g x * ln (f x))) ---> 0) (inf F (principal {x. f x \<noteq> 0}))" |
2553 then have "((\<lambda>x. exp (g x * ln (f x))) ---> 0) (inf F (principal {x. f x \<noteq> 0}))" |
2554 by (auto intro!: filterlim_compose[OF exp_at_bot] filterlim_compose[OF ln_at_0] |
2554 by (auto intro!: filterlim_compose[OF exp_at_bot] filterlim_compose[OF ln_at_0] |
2555 filterlim_tendsto_pos_mult_at_bot[OF _ \<open>0 < b\<close>] |
2555 filterlim_tendsto_pos_mult_at_bot[OF _ \<open>0 < b\<close>] |
2556 intro: tendsto_mono inf_le1 g) } |
2556 intro: tendsto_mono inf_le1 g) } |
2557 then show "((\<lambda>x. exp (g x * ln (f x))) ---> (if a = 0 then 0 else exp (b * ln a))) (inf F (principal {x. f x \<noteq> 0}))" |
2557 then show "((\<lambda>x. exp (g x * ln (f x))) ---> (if a = 0 then 0 else exp (b * ln a))) (inf F (principal {x. f x \<noteq> 0}))" |
2569 then show ?thesis |
2569 then show ?thesis |
2570 proof (rule DERIV_cong_ev[OF refl _ refl, THEN iffD1, rotated]) |
2570 proof (rule DERIV_cong_ev[OF refl _ refl, THEN iffD1, rotated]) |
2571 from DERIV_isCont[OF g] pos have "\<forall>\<^sub>F x in at x. 0 < g x" |
2571 from DERIV_isCont[OF g] pos have "\<forall>\<^sub>F x in at x. 0 < g x" |
2572 unfolding isCont_def by (rule order_tendstoD(1)) |
2572 unfolding isCont_def by (rule order_tendstoD(1)) |
2573 with pos show "\<forall>\<^sub>F x in nhds x. exp (f x * ln (g x)) = g x powr f x" |
2573 with pos show "\<forall>\<^sub>F x in nhds x. exp (f x * ln (g x)) = g x powr f x" |
2574 by (auto simp: eventually_at_filter powr_def elim: eventually_elim1) |
2574 by (auto simp: eventually_at_filter powr_def elim: eventually_mono) |
2575 qed |
2575 qed |
2576 qed |
2576 qed |
2577 |
2577 |
2578 lemma DERIV_fun_powr: |
2578 lemma DERIV_fun_powr: |
2579 fixes r::real |
2579 fixes r::real |
2608 have "((\<lambda>x. exp (s * ln (f x))) ---> (0::real)) F" (is "?X") |
2608 have "((\<lambda>x. exp (s * ln (f x))) ---> (0::real)) F" (is "?X") |
2609 by (auto intro!: filterlim_compose[OF exp_at_bot] filterlim_compose[OF ln_at_top] |
2609 by (auto intro!: filterlim_compose[OF exp_at_bot] filterlim_compose[OF ln_at_top] |
2610 filterlim_tendsto_neg_mult_at_bot assms) |
2610 filterlim_tendsto_neg_mult_at_bot assms) |
2611 also have "?X \<longleftrightarrow> ((\<lambda>x. f x powr s) ---> (0::real)) F" |
2611 also have "?X \<longleftrightarrow> ((\<lambda>x. f x powr s) ---> (0::real)) F" |
2612 using f filterlim_at_top_dense[of f F] |
2612 using f filterlim_at_top_dense[of f F] |
2613 by (intro filterlim_cong[OF refl refl]) (auto simp: neq_iff powr_def elim: eventually_elim1) |
2613 by (intro filterlim_cong[OF refl refl]) (auto simp: neq_iff powr_def elim: eventually_mono) |
2614 finally show ?thesis . |
2614 finally show ?thesis . |
2615 qed |
2615 qed |
2616 |
2616 |
2617 lemma tendsto_exp_limit_at_right: |
2617 lemma tendsto_exp_limit_at_right: |
2618 fixes x :: real |
2618 fixes x :: real |
2655 apply (rule add_pos_nonneg, auto intro: divide_nonneg_nonneg) |
2655 apply (rule add_pos_nonneg, auto intro: divide_nonneg_nonneg) |
2656 apply (subgoal_tac "x / real xa > -1") |
2656 apply (subgoal_tac "x / real xa > -1") |
2657 apply (auto simp add: field_simps) |
2657 apply (auto simp add: field_simps) |
2658 done |
2658 done |
2659 then show "eventually (\<lambda>n. (1 + x / n) powr n = (1 + x / n) ^ n) at_top" |
2659 then show "eventually (\<lambda>n. (1 + x / n) powr n = (1 + x / n) ^ n) at_top" |
2660 by (rule eventually_elim1) (erule powr_realpow) |
2660 by (rule eventually_mono) (erule powr_realpow) |
2661 show "(\<lambda>n. (1 + x / real n) powr real n) ----> exp x" |
2661 show "(\<lambda>n. (1 + x / real n) powr real n) ----> exp x" |
2662 by (rule filterlim_compose [OF tendsto_exp_limit_at_top filterlim_real_sequentially]) |
2662 by (rule filterlim_compose [OF tendsto_exp_limit_at_top filterlim_real_sequentially]) |
2663 qed auto |
2663 qed auto |
2664 |
2664 |
2665 subsection \<open>Sine and Cosine\<close> |
2665 subsection \<open>Sine and Cosine\<close> |