Files
ARPZ_s1_pr1.1/functions.cpp
2024-10-12 10:45:18 +03:00

30 lines
471 B
C++

#include <cmath>
// 1.1 e^(x - 1) - x^3 - x
double function_1(double x)
{
return std::exp(x - 1) - std::pow(x, 3) - x;
}
// 1.2 1 / (3 + sin(3.6x))
double function_2(double x)
{
return 1 / (3 + std::sin(3.6 * x));
}
// 1.3 arccos(x) - √(1 - 0.3x^3)
double function_3(double x)
{
return std::acos(x) - std::sqrt(1 - 0.3 * std::pow(x, 3));
}
// 1.9 0.25x^3 + x - 2
double function_9(double x)
{
return 0.25 * std::pow(x, 3) + x - 2;
}