Txerrinko

FuncionMatematica

Mar 18th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. package Ejercicio8;
  2.  
  3. public class FuncionMatem {
  4.  
  5.     public static double X;
  6.  
  7.     public FuncionMatem(double pX) {
  8.         X = pX;
  9.     }
  10.  
  11.     public void evaluar() {
  12.         evaluarX(X);
  13.     }
  14.  
  15.     public static void evaluarX(double x) {
  16.         double x1 = Math.sqrt(Math.sin(x * (x * x + 2.0 / 9.0)))
  17.                 + Math.cos(6.0 * Math.PI + Math.tan(Math.pow(Math.E, x * x * x)));
  18.         System.out.println(x1);
  19.     }
  20.  
  21.     public static void main(String[] args) {
  22.         FuncionMatem f1 = new FuncionMatem(0);
  23.         f1.evaluar();
  24.         f1.evaluarX(0);
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment