如何用JAVA程序实现双曲线的公式?
比如:输入a,b值,对a,b值的限制等等...
急啊!谢谢!

解决方案 »

  1.   

    双曲线:-=1(a>0, b>0) 
      (1)范围:|x|≥a, y∈R 
      (2)顶点:(±a,0) 
      (3)焦点:(±c,0) 
      (4)离心率:e=∈(1,+∞) 
      (5)准线:x=±
      (6)渐近线:y=±x
      

  2.   

    双曲线函数?
    我在网上看了一个
    形如 sinh x=(ex-e-x)/2 的函数称为双曲线正弦函数(sine hyperbolic)
    package com.test.coreJava.util.num;public class sineHyperbolic { /**
     * 形如 sinh x=(e^x-e^-x)/2 的函数称为
     * 双曲线正弦函数(sine hyperbolic)
     */
    public boolean matchSinh(double x,double y){
    boolean result=false;
    if(y==this.getSinh(x))result=true;
    return result;
    }
    public double getSinh(double x){
    double e=Math.E;//
    double y=e,result;
    for(int i=1;i<x;i++)
    y*=e;
    result=(y-1/y)/2;
    return result;
    }
    public static void main(String[] args) {
    sineHyperbolic sinh=new sineHyperbolic();
    System.out.println(sinh.matchSinh(2, 3.6268604078470186));
    System.out.println(sinh.matchSinh(2, 3.6));
    }}
    result:
    true
    false就是判断x,y是否符合双曲线正弦函数。