Escolar Documentos
Profissional Documentos
Cultura Documentos
Lista 2
→ Programação:
#include <stdio.h>
#include <math.h>
double matriz[3][4] = {
{somaX4, somaX3, somaX2, somaX2Y},
{somaX3, somaX2, somaX, somaXY},
{somaX2, somaX, n, somaY}
};
int main() {
// Definindo os pontos no intervalo [-1, 1]
double x[] = {-1, 0, 1};
double y[] = {6, 0, -4}; // Calculados a partir de f(x) = x^4 - 5x
return 0;
}
3)
→ Programação:
#include <stdio.h>
return alpha;
}
int main() {
int n = 11; // Quantidade de pontos a serem inseridos
double x[n], fx[n]; // Arrays para armazenar os valores de x e f(x)
return 0;
}
→ Programação:
#include <math.h>
#include <stdio.h>
float func(float x) {
return exp(x) * cos(x);
}
int main(void) {
float a, b;
int n;
5)
→ Programação:
#include <math.h>
#include <stdio.h>
int main() {
float a, b, simpson = 0.0f, intervalWidth, k;
int i, numIntervals;
intervalWidth = (b - a) / numIntervals;
return 0;
}