Çözüldü Üstel Fonksiyonlu Denklem-Türev-Ara Değer (Intermediate Value) Teoremi-Programlama

Konusu 'Limit ve Süreklilik,Türev,İntegral' forumundadır ve Honore tarafından 24 Temmuz 2026 18:43 başlatılmıştır.

Yüklüyor...
  1. Honore

    Honore Yönetici Yönetici

    Mesajlar:
    11.285
    Beğenileri:
    652
    Cinsiyet:
    Bay
    Meslek:
    Müh. (Elk./Bilg.)
    University of Oregon'dan çözümlü bir problemin fen lisesi için hesap makinesi kullanımının da serbest olduğu klasik sınav uyarlaması:

    e^x = 1000x denklemini sağlayan kaç kök olduğunu cebirsel olarak açıklayınız, grafiğini çiziniz ve bildiğiniz bir programlama dilinde çözümü veren kodu yazınız.

    [​IMG]
    https://i.ibb.co/N2m789q2/UOregon.png
    https://pages.uoregon.edu/math/syllabi/syllabi2012-2013/Math 251/251Final2-Fall2012.pdf
    (Sayfa 1 - 2, Soru 2)

    Grafik:
    [​IMG]
    https://i.ibb.co/WWVLfFpF/UOregon-Graph.png
    https://www.wolframalpha.com/input?i=plot y=e^x, y=1000x

    "Google Gemini Yapay Zekâ"nın Cebirsel Açıklaması ve Fortran Çözümü:
    (Anlaşılamayan yerler varsa lütfen haberimiz olsun.)
    [​IMG]
    https://i.ibb.co/YF4YVrPb/UOregon-Gemini.png

    [​IMG]
    https://i.ibb.co/XfWLW9LV/UOregon-Gemini-Fortran.png

    Program:
    Kod:
    ! e^x = 1000x
    ! Program written by Google Gemini AI
    
    program newton_raphson_all_roots
        implicit none
    
        ! Parameters for numerical precision and limits
        real(8), parameter :: TOLERANCE = 1.0d-12
        integer, parameter :: MAX_ITERATIONS = 100
    
        ! Array of initial guesses to find both roots
        real(8), dimension(2) :: guesses
        real(8) :: x_curr, x_next, fx, dfx, error
        integer :: i, iter
        logical :: converged
    
        ! Define the two initial guesses based on mathematical analysis
        guesses(1) = 0.0d0   ! Targets the smaller root near x ~ 0.001
        guesses(2) = 10.0d0  ! Targets the larger root near x ~ 9.118
    
        print *, "========================================================="
        print *, "   Newton-Raphson Root Finder for: exp(x) - 1000x = 0    "
        print *, "========================================================="
    
        ! Loop through each initial guess to locate all roots
        do i = 1, 2
            x_curr = guesses(i)
            converged = .false.
          
            print *
            print '(A, I1, A, F5.1)', " Searching for Root ", i, " using initial guess: ", x_curr
            print *, "---------------------------------------------------------"
            print '(A10, A20, A20)', "Iter", "x_value", "f(x)"
            print *, "---------------------------------------------------------"
    
            do iter = 1, MAX_ITERATIONS
                fx = f(x_curr)
                dfx = df(x_curr)
    
                ! Print progress tracking for transparency
                print '(I10, F20.12, E20.4E2)', iter, x_curr, fx
    
                ! Safety check: Prevent division by zero if derivative vanishes
                if (abs(dfx) < 1.0d-30) then
                    print *, " Error: Derivative is too close to zero. Aborting."
                    exit
                end if
    
                ! Core Newton-Raphson update equation
                x_next = x_curr - (fx / dfx)
                error = abs(x_next - x_curr)
    
                ! Check for convergence criteria
                if (error < TOLERANCE) then
                    x_curr = x_next
                    converged = .true.
                    exit
                end if
    
                ! Update the current approximation for the next loop iteration
                x_curr = x_next
            end do
    
            ! Output the results for the targeted root
            print *, "---------------------------------------------------------"
            if (converged) then
                print '(A, F20.12)', " SUCCESS: Found root at x = ", x_curr
                print '(A, E20.4E2)', " Final residual f(x)     = ", f(x_curr)
            else
                print *, " FAILURE: Method did not converge within maximum iterations."
            end if
            print *, "========================================================="
        end do
    
    contains
    
        ! Evaluation of the objective function f(x)
        real(8) function f(x)
            real(8), intent(in) :: x
            f = exp(x) - 1000.0d0 * x
        end function f
    
        ! Evaluation of the derivative function f'(x)
        real(8) function df(x)
            real(8), intent(in) :: x
            df = exp(x) - 1000.0d0
        end function df
    
    end program newton_raphson_all_roots
     
    : Fortran

  2. Benzer Konular: Üstel Fonksiyonlu
    Forum Başlık Tarih
    Ivır Zıvır Sorular - Sohbet (Trivial Questions - Chat) Üstel Fonksiyonlu İntegralde Değişken Dönüşümü Dün 13:31
    Ivır Zıvır Sorular - Sohbet (Trivial Questions - Chat) Tam Sayılar Kümesinde Üstel Fonksiyonlu Denklem 13 Nisan 2026
    Diğer Üstel Fonksiyonlu Denklemde Logaritma - Sayısal Çözümlemede Newton Raphson Yöntemi 10 Mart 2026
    Hatalı - Tekrarlanmış Sorular veya Çözümler (Faulty - Repeated Questions or Solutions) Üstel Fonksiyonlu Logaritmik Eşitsizlik - Programlama (Soru eksik) 7 Aralık 2025
    Trigonometri,Karmaşık Sayılar,Logaritma,Parabol Üstel Fonksiyonlu Logaritmik Denklem 11 Mart 2025

Sayfayı Paylaş