module ProjectionMethods.RitzTaskData

open System
open ProjectionMethods.RitzTaskModel

// General form
// Equation: -(p(x) * y(x)')' + r(x) * y(x) = f(x)
// Initial conditions:
// α_1 * y(-1) - α_2 * y'(-1) = 0
// β_1 * y(1) + β_2 * y'(1) = 0

// Option 1 from method_part_2_2 (Pakulina's manual)
let p x = (/) 1.0 (x + 2.0)

let r x = x |> Math.Cos

let f x = 1.0 + x

let equationData = { p = p; r = r; f = f }

let initialData =
    { α_1 = 1.0
      α_2 = 0.0
      β_1 = 1.0
      β_2 = 0.0 }

let taskData: RitzTask =
    { Equation = equationData
      InitialConditions = initialData }