Çözüldü Kinematik - Yaklaşık İntegrasyonda Serilerin Kullanımı - Sayısal Çözümleme - Programlama

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

Yüklüyor...
  1. Honore

    Honore Yönetici Yönetici

    Mesajlar:
    11.503
    Beğenileri:
    652
    Cinsiyet:
    Bay
    Meslek:
    Müh. (Elk./Bilg.)
    Princeton University'den çözümlü bir problemin fen lisesi için klasik sınav uyarlaması:

    (n = 0'dan sonsuza), Σ (-1)^n·x^(2n) / [ (2n)! ] = cos(x) olduğuna göre yatay düzlemde duran ve hız denklemi
    v(t) = cos(√t) olan bir cismin ilk 0,1 birim zamanda aldığı yolun 1 / 1000'den daha az hatalı değerini cebirsel yoldan bulunuz ve bildiğiniz bir programlama dilinde de bu sonucu veren kodlamayı yapınız.


    [​IMG]
    https://i72.servimg.com/u/f72/19/97/10/39/prince30.png
    https://web.math.princeton.edu/~nelson/104/fall06finalsolutions.pdf
    (Sayfa 5, Soru 4)

    Fortran Çözümü:
    [​IMG]
    https://i72.servimg.com/u/f72/19/97/10/39/simpso10.png

    Program:
    Kod:
    ! Program written by Google Gemini AI and slightly changed by me
    program simpson_integration
        implicit none
      
        ! Define variables using double precision (8 bytes)
        double precision :: a, b, h, total_sum, integral
        integer :: n, i
        double precision :: x
      
        ! 1. Inputs: Define boundaries and intervals
        a = 0.0d0          ! Lower limit of integration
        b = 0.1d0          ! Upper limit of integration
        n = 100            ! Number of sub-intervals (must be even)
      
        ! Ensure n is even; if odd, add 1 to satisfy Simpson's rule requirements
        if (mod(n, 2) /= 0) then
            n = n + 1
        end if
      
        ! 2. Calculate the step size (h)
        h = (b - a) / dble(n)
      
        ! Initialize the sum with the boundary elements: f(a) + f(b)
        total_sum = f(a) + f(b)
      
        ! 3. Loop through internal points and apply coefficients
        ! Alternate coefficients: 4 for odd indexes, 2 for even indexes
        do i = 1, n - 1
            x = a + dble(i) * h
            if (mod(i, 2) /= 0) then
                total_sum = total_sum + 4.0d0 * f(x) ! Odd terms multiplied by 4
            else
                total_sum = total_sum + 2.0d0 * f(x) ! Even terms multiplied by 2
            end if
        end do
      
        ! 4. Compute final composite integration result
        integral = (h / 3.0d0) * total_sum
      
        ! 5. Print out the formatted result
        print '(A, F6.4)', ' The approximated integral value is 39 / 400 = ', integral
    
    contains
    
        ! Define the target function to integrate f(x)
        ! Example here integrates f(x) = cos(√x) (Expected analytical answer over [0,.1] is 0.0975)
        double precision function f(x)
            implicit none
            double precision, intent(in) :: x
          
            f = cos(sqrt(x))
        end function f
    
    end program simpson_integration

  2. Benzer Konular: Kinematik Yaklaşık
    Forum Başlık Tarih
    FİZİK Özel Rölativite Kuramı ve Lorentz Koordinat Dönüşümleri - Diferansiyel - Kinematik 18 Eylül 2026
    Zor Sorular (Akademik Problemler Hariç) Dinamiğin İkinci Yasası - Kinematik - Türev ve İntegral 18 Ağustos 2026
    Limit ve Süreklilik,Türev,İntegral Kinematik - Trigonometri - Değişim Oranı - Türev 14 Ağustos 2026
    FİZİK Kinematik - Türev ve İntegral Uygulaması 4 Ağustos 2026
    Ivır Zıvır Sorular - Sohbet (Trivial Questions - Chat) Kinematik - Pisagor Teoremi - Türev 18 Temmuz 2026

Sayfayı Paylaş