You are on page 1of 1

ASPIRE COLLEGE JHELUM

BS PROGRAM MID TERM SPRING 2023


Marks: 30 Subject: Computing tools Session:2019-2023
For Mathematics
Time: 1 hr 30 min Class: BS(HONS) Semester: 8th

Q1. Attempt all the questions (2×8=16)


i. What is the difference between for and while loop in Mathematica?
ii. Write a program to generate a parabola, circle, line and rectangle in a Column ?
(With circle is on origin with radius 1.5 and (0,0),(1,1) are rectangle points
along with a line whose points are (0,1) and (3,4).)
iii. Define a list which contains first 50 even numbers using nestlist command?
iv. What is the difference between “=” and “==” sign in Mathematica?
v. Draw the graph of the following function
f ( x , y )=sin ( x + y ) at−3 ≤ x ≤3∧−2 ≤ y ≤ 2∈mathematica.
2

vi. Write a program which takes first derivative and second derivative of
tan(x)*cosec(x) and then maximize the function?
vii. Find the sum of first 1000 values in Mathematica using any loop?
viii. Draw circle with thickness 0.3 and color is red with radius 1 and centered at
origin.

Q2. Attempt all the questions (7×2=14)

i. Why we use numerical methods? Write a program on Jacobi method in


which last result prints a table of solution with the required iterations
Where system of equation is given as:
10x-y+2z=6
-x+11y-z+3k=25
2x-y+10z-k=-11
3y-z+8k=15
ii. Write a program of newton Raphson method to find the root of x-xcos(x)=0
With initial value starts from 0.

You might also like