Aqeel Computational Assignment Final

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Advanced Computational Mathematics-Finalterm

Assignment

Name:Aqeel Ahmad Reg No:MSc-07

Question No 01
The x-y data of a system is given below. Plot the data and
properly label it within x = 0 to x =1.4. find area under curve
within this range as well.

x 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6


y 5 5.2 5.3 5.4 5.5 5.6 5.7 5.7 5.8
Question No 02
A trigonometric identity is given by following relation
𝑥 𝑡𝑎𝑛𝑥 + 𝑠𝑖𝑛𝑥
cos2 2 = 2𝑡𝑎𝑛𝑥
Verify that the identity is correct by calculating the left and right
hand side of equations at x=pi/5

Question No 03
1. Create following matrices in Matlab/octave

a. Calculate A+B and B+A


b. Calculate A+(B+C) and (A+B)+C
c. Show that multiplication with scalar quantity is distributive (e.g.
3(A+B)=3A+3B)

Question No 04
A vector x is given as
x=[5,7,9,-3,0,-8,-1,12,-6,4,-4,-7,16]
Write a program as script file that double the elements that are
positive and divisible by 3 and raise the power to 2.5 of elements
that are negative but greater than -2.

Question No 05
if y=exp(-x^2), y(0)=1
Write a script file using for loop to use Euler method to solve this
equation. Plot x,y and report the results up to 3 decimal points
using fprintf command.
Question No 06
Determine the bubble point temperature of a binary mixture
containing 20 mol% benzene (A) and 80 mol% toluene (B) at

10 bar pressure. Assume ideal gas-ideal solution model. The


bubble point condition is as follows:
Antoine eq
paramters A B C
Benzene 14.18 2983. 41.53
43 172 54
Toluene 14.18 3218. 47.55
84 87 2
Question No 07
Calculate the equilibrium composition of the following
reaction at 2 bar and 230 °C with 40% O2 and 60 % NO in
the feed.

Equilibrium constant an mole fraction are as follows:

You might also like