using System;
using Science.Mathematics;
using L=Science.Mathematics.IntegralEquation;
namespace ScienceTest.MathematicsTest.IntegralEquationTest
{
///
/// InhomogeneousFredholmEquationSecondKindTest
///
public class InhomogeneousFredholmEquationSecondKindTest
{
public InhomogeneousFredholmEquationSecondKindTest()
{
}
private string result;
public string Result
{
get{return result;}
}
public void Compute()
{
Function.ToLastType K
= new Function.ToLastType(kernel);
Function.ToLastType g
= new Function.ToLastType(function);
L.InhomogeneousFredholmEquationSecondKind eq
= new L.InhomogeneousFredholmEquationSecondKind();
eq.Kernel = K;
eq.KernelFunction = g;
eq.From = 0.0;
eq.To = Math.PI/2.0;
eq.NumberOfPoints = 30;
eq.Solve();
eq.At = 0.1;
result += Convert.ToString(eq.Solution)+"\r\n";
eq.At = 0.2;
result += Convert.ToString(eq.Solution)+"\r\n";
eq.At = 0.3;
result += Convert.ToString(eq.Solution)+"\r\n";
eq.At = 0.4;
result += Convert.ToString(eq.Solution)+"\r\n";
eq.At = 0.5;
result += Convert.ToString(eq.Solution)+"\r\n";
eq.At = 0.6;
result += Convert.ToString(eq.Solution)+"\r\n";
}
private double kernel(double t, double s)
{
return Math.Pow(t*s,0.75);
}
private double function(double t)
{
return Math.Sqrt(t)-Math.Pow(Math.PI/2.0,2.25)/2.25*Math.Pow(t,0.75);
}
}
}
/*
0.316227790199073
0.447213636169468
0.547722612628742
0.632455600431366
0.707106862044724
0.774596761947918
*/