• Home
  • Courses
  • School
  • Programs
  • Problems
  • Contact Us
  • My account
  • Register

Have any question?

(+91) 98222 16647
info@simplycoding.in
RegisterLogin
Simply Coding
  • Home
  • Courses
  • School
  • Programs
  • Problems
  • Contact Us
  • My account
  • Register

Java

Forming Math Expressions

  • Categories Java, Operators, Math Library

Before we start attempting the questions on Java Math class, lets do a quick revision on Java libraries and Math class in particular.

Click here -> Java Class Libraries

Lets Start!

  1. Write a Java expression for the following:

5/10+ x5  + 4/ bx3

Ans.

5.0/10.0 + Math.pow(x,5)  + 4.0/ b * Math.pow(x, 3)

  1. Write the Java expression for

ax5 + bx3 + c

Ans.

a * Math.pow(x, 5) + b * Math.pow(x, 3) + c

  1. Write down java expression for :

T = square root (A2 + B2 + C2)

Ans.

    double T = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) + Math.pow(C, 2));

  1. Write the Java expression for:

(A2 + B2 )/ 2ab 

Ans.

(Math.pow(a, 2) + Math.pow(b, 2)) / (2 * a * b)

  1. Write the java expressions for each of the following: 

(i)  x = e|2x – 4x|
(ii) s=√(sin(a) + tan(a) – e2x)

Ans:

(i) x = Math.exp(Math.abs(2*x-4*x))
(ii) s = Math.sqrt(Math.sin(a)+Math.tan(a)-Math.exp(2*x))

  1. Write an expression for:
 Ans.

(x + Math.pow (y, 2)) / (Math.cbrt(3)+y)

  1. Write Java expression for following.
 Ans.

x= a*b+(1.0/2.0)*c*Math.pow(b,2);

  1. Write an expression in java for:
 Ans.

A= ( Math.pow((a+b),2 ) * Math.pow((a-b),3)) / 2*a*b

  1. Write an expression in java for:
Ans.

X=Math.abs(A)+ Math.abs(B) +(Math.pow(A,3)+ Math.pow(B,4))

  1. Write an expression in java for:
Ans.

x=Math.sqrt ((2 * Math.pow(x,3) + 3*Math.pow(y,2) ) / (x+y)

  1. Write an expression in java for:
Ans.

A= Math.sqrt(Math.pow(p,x) + Math.pow(q,2));

  1. Write equivalent Java expressions for the following:
Ans.
    1. Math.sqrt(a+b)
    2. 1/3.0*Math.pow(a,3)+1/3.0*Math.pow(b,3)
  1. Write equivalent Java expressions for the following:
Ans.
    1. s=u*t+1/2.0*a*Math.pow(t,2)
    2. d=Math.sqrt(l*l+b*b);
  1. Write equivalent Java expressions for the following:
Ans.
  1. (-b+Math.sqrt(b*b-4*a*c))/(2*a) and (-b-Math.sqrt(b*b-4*a*c))/(2*a)
  2. (Math.pow(a,3)+Math.pow(b,3))/ (Math.pow(a,3)-Math.pow(b,3))
  1. Write equivalent Java expressions for the following:
Ans.
    1. Math.abs((a*a*a+b*b*b)/(a*a*a-b*b*b))
    2. Math.cbrt((a+b)/(a*b))
  1. Write equivalent Java expressions for the following:
Ans.
    1. Math.pow(a+b,n)/Math.sqrt(3+b)
    2. Z=(5*x*x*x+2*y)/(x+y);
  1. Write equivalent Java expressions for the following:
Ans.
    1. (a*a+b*b)/(a+b)
    2. T=Math.sqrt(A*A+B*B+C*C);
  1. Write equivalent Java expressions for the following:

ax5+bx3+c

Ans.

a*Math.pow(x,5)+b*Math.pow(x,3)+c

  • Share:
author avatar
Simply Coding

Previous post

Java Arrays Exercises
June 13, 2020

Next post

Computer Networking Notes and Questions to revise in 1 Hour
June 13, 2020

You may also like

Java Operator
Java Operators
16 June, 2021
Java Class Librares
Java Class Libraries and Packages
16 June, 2021
Input-Output in Java
Input/Output in Java
17 January, 2021

Leave A Reply Cancel reply

You must be logged in to post a comment.

Categories

  • Uncategorized
  • Programs
    • Python
    • Java
  • Problems
    • Python
    • Java
    • Web Development
      • Internet
    • Emerging Technologies
  • Notes
    • General
    • QBasic
    • MS Access
    • Web Development
      • XML
      • HTML
      • JavaScript
      • Internet
    • Database
    • Logo Programming
    • Scratch
    • Emerging Trends
      • Artificial Intelligence
      • Internet of Things
      • Cloud Computing
      • Machine Learning
    • Computer Fundamentals
      • Computer Networks
      • E-Services
      • Computer Hardware
    • Python
    • Java
  • School
    • ICSE
      • Computers Class 9
        • Java Introduction
        • Tokens & Data Types
        • Java Operators
        • Math Library
        • if & switch
        • For & While
        • Nested loops
      • Computer Class 10
        • Sample Papers
        • OOPS concepts
        • Functions in Java
        • Constructors
        • Arrays in Java
        • Strings in Java
    • SSC
      • IT Class 11
        • IT Basics
        • DBMS
        • Web Designing
        • Cyber Laws
      • IT Class 12
        • Web Designing
        • SEO
        • Advanced JavaScript
        • Emerging Tech
        • Server Side Scripting
        • E-Com & E-Gov
      • Computer Science 11
      • Computer Science 12
    • CBSE
      • Computer 9
        • Basics of IT
        • Cyber Safety
        • Scratch
        • Python
      • Computer 10
        • Sample Papers
        • Networking
        • HTML
        • Cyber Ethics
        • Scratch
        • Python
      • Computer Science 11
        • Computer Systems
        • Python 11
          • Python Basics
          • Python Tokens
          • Python Operators
          • Python if-else
          • Python loops
          • Python Strings
          • Python List
          • Python Tuple
          • Python Dictionary
          • Python Modules
        • Data Management
      • Computer Science 12
        • Sample Papers
        • Python 12
          • Python Functions
          • Python File Handling
          • Python Libraries
          • Python Recursion
          • Data Structures
        • Computer Networks
        • Data Management
    • ISC
      • Computer Science 11
        • Introduction to Java
        • Values & Data Types
        • Operators
        • if & switch
        • Iterative Statements
        • Functions
        • Arrays
        • String
        • Data Structures
        • Cyber Ethics
      • Computer Science 12
        • Sample Papers
        • Boolean Algebra
        • OOPS
        • Wrapper Classes
        • Functions
        • Arrays
        • String

Categories

  • Uncategorized
  • Programs
    • Python
    • Java
  • Problems
    • Python
    • Java
    • Web Development
      • Internet
    • Emerging Technologies
  • Notes
    • General
    • QBasic
    • MS Access
    • Web Development
      • XML
      • HTML
      • JavaScript
      • Internet
    • Database
    • Logo Programming
    • Scratch
    • Emerging Trends
      • Artificial Intelligence
      • Internet of Things
      • Cloud Computing
      • Machine Learning
    • Computer Fundamentals
      • Computer Networks
      • E-Services
      • Computer Hardware
    • Python
    • Java
  • School
    • ICSE
      • Computers Class 9
        • Java Introduction
        • Tokens & Data Types
        • Java Operators
        • Math Library
        • if & switch
        • For & While
        • Nested loops
      • Computer Class 10
        • Sample Papers
        • OOPS concepts
        • Functions in Java
        • Constructors
        • Arrays in Java
        • Strings in Java
    • SSC
      • IT Class 11
        • IT Basics
        • DBMS
        • Web Designing
        • Cyber Laws
      • IT Class 12
        • Web Designing
        • SEO
        • Advanced JavaScript
        • Emerging Tech
        • Server Side Scripting
        • E-Com & E-Gov
      • Computer Science 11
      • Computer Science 12
    • CBSE
      • Computer 9
        • Basics of IT
        • Cyber Safety
        • Scratch
        • Python
      • Computer 10
        • Sample Papers
        • Networking
        • HTML
        • Cyber Ethics
        • Scratch
        • Python
      • Computer Science 11
        • Computer Systems
        • Python 11
          • Python Basics
          • Python Tokens
          • Python Operators
          • Python if-else
          • Python loops
          • Python Strings
          • Python List
          • Python Tuple
          • Python Dictionary
          • Python Modules
        • Data Management
      • Computer Science 12
        • Sample Papers
        • Python 12
          • Python Functions
          • Python File Handling
          • Python Libraries
          • Python Recursion
          • Data Structures
        • Computer Networks
        • Data Management
    • ISC
      • Computer Science 11
        • Introduction to Java
        • Values & Data Types
        • Operators
        • if & switch
        • Iterative Statements
        • Functions
        • Arrays
        • String
        • Data Structures
        • Cyber Ethics
      • Computer Science 12
        • Sample Papers
        • Boolean Algebra
        • OOPS
        • Wrapper Classes
        • Functions
        • Arrays
        • String
Simply Coding Computer Courses for School                Privacy Policy     Terms of Use     Contact Us

© 2021 Simply Coding

Login with your site account

Lost your password?

Not a member yet? Register now

Register a new account

Are you a member? Login now