group3ppt-240508074515-Engineering Mathematics II Presentation.pptx
AmolAher20
22 views
21 slides
Mar 10, 2025
Slide 1 of 21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
About This Presentation
Engineering Mathematics II Presentation
Size: 842.06 KB
Language: en
Added: Mar 10, 2025
Slides: 21 pages
Slide Content
SANJIVANI COLLEGE OF ENGINEERING, KOPARGAON (An autonomous Institute affiliated to SPPU Pune) Engineering Mathematics II Presentation Guided By: Prof. A. S. Aher
1.Solve : = xy+ = xz , y(0)=1, z(0)=2, h=0.2 Find y , z at x=0.2.
Here, Starting at ( , and taking the step for x,y,z to be respectively the RK method gives By RK method, =0.2( =0.2(0*1+0) =0 = =0.2(0*2) =
= ) = = ] =0.2(0.20+0.04) =0.2(0.24) = 0.05 2 + 2 + = 0+2*(0.02)+2*(0.02)+0.05] = k = 0.02 Therefore , at =0 is =1+0.02 and y=1.02 = ) = = ] =0.2(0) =0.2(0.408) = 0.08 u +2 + = 0+2*(0.04)+2*(0.04)+0.08] = u = 0.04 at =0 is z =2+0.04 and z=2.04
Q.2) Write a computer programming for backward difference formula .
Step 1 - Define a function backward_difference_table(x, y) that takes two arguments, x and y. Step 2 -Calculate the length of y and store it in n. Step 3 - Create a 2D table of size n x n filled with zeros. Step 4 - Initialize the first column of the table with the values of y. Step 5 - Iterate over the remaining columns of the table and calculate the backward differences using the formula table[i][j] = table[i+1][j-1] - table[i][j-1]. Step 6 -Return the table. Step 7 - Define a function newton_backward_interpolation(x, x_values, y_values) that takes three arguments, x, x_values, and y_values. Step 8 - Calculate the length of x_values and store it in n. Step 9 - Calculate the value of h as the difference between the first two values of x_values. Step 10 - Calculate the value of u using the formula u = (x - x_values[n-1]) / h. Step 11 -Calculate the backward difference table using the backward_difference_table function. Step 12 -Initialize the result variable with the value at the bottom of the last column of the table. Algorithm:
Step 13 - Iterate over the remaining columns of the table and calculate the interpolation using the formula result += term, where term is calculated as term *= (u + j) / (j + 1). Step 14 -Return the result. Step 15 -Take user input for x, x_values, and y_values. Step 16 -Calculate and display the backward difference table. Step 17 -Calculate and display the interpolated value at x.
Source Code: def backward_difference_table(x, y): n = len(y) table = [[0 for _ in range(n)] for _ in range(n)] for i in range(n): table[i][0] = y[i] for j in range(1, n): for i in range(n-j): table[i][j] = table[i+1][j-1] - table[i][j-1] return table def newton_backward_interpolation(x, x_values, y_values): n = len(x_values) h = x_values[1] - x_values[0] u = (x - x_values[n-1]) / h table = backward_difference_table(x_values, y_values) result = table[n-1][0]
Source Code: # Taking user input for x, x_values, and y_values x = float(input("Enter the value of x for which you want to find the value: ")) x_values = list(map(float, input("Enter the values of x (space-separated): ").split())) # Calculating and displaying the backward difference table table = backward_difference_table(x_values, y_values) print("Newton's Backward Difference Table:") for row in table: print(row) # Calculating and displaying the final output output = newton_backward_interpolation(x, x_values, y_values) printf("The interpolated value at x = {x} is: {output}")
Output:
Q. 3 ) Using Taylor's series express 2 +5 +6 in powers of (x-1).
By Taylors Series: f ( ) ⋯⋯ Compare power = = a f ( ) ⋯⋯ . ……equation(1)
Put the value in Equation (1) f ( x ) f ( x ) f ( x ) Thus, the Taylor series expansion becomes: f ( x )
Q.4) Find the center of mass of a thin , uniform plate whose shape is the region between y = cos x and the x - axis between x= ℿ/2 and x = ℿ/2. Since the density is constant , we may take p(x, y)= 1.
It is clear that but for matrics lets compute it First we compute the mass m= 1 dydx = cosxdx= = … mx= ydydx = . = . My= dydx = x cos x dx=0 So
sin2x x = Mx =
= - [- COSX = [ = [ = [ 1 - 1 ] + [0 – 0] = 0 My=
References Books: B. S. Grewal, Higher Engineering Mathematics, 42nd ed. Khanna Publishers, 2012. ISBN: 978-8174091154. H. K. Das, Engineering Mathematics. S Chand, 2006. ISBN: 8121905209. G. V. Davis, Numerical Methods in Engineering and Science. Springer, 1986. ISBN: 978-94-011-6958-5. R. K. Jain and S. R. K. Iyengar, Advanced Engineering Mathematics, Narosa Publishing House, 2014. ISBN: 978-1842653418. N. P. Bali and M. Goyal, A Text Book of Engineering Mathematics, 8th ed. Lakshmi Publications, 2012.ISBN: 978-8131808320. E. Kreyszig, Advanced Engineering Mathematics, 9th ed. Wiley, 2013. ISBN: 978-0471488859. E. B. Staff and A. D. Snider, Fundamentals of Complex Analysis with Application to Engineering and Science, 3rd ed. ISBN: 0139078746. P. Dawkins, Calculus III, Lamar University Texas, 2018. [Online]. Available: http://tutorial.math.lamar.edu . E-Resources https://ocw.mit.edu/courses/18-04-complex-variables-with-applications-spring-2018/pages/lecture-notes/ https://www.codechef.com/ https://www.geeksforgeeks.org/courses?source=google&medium=cpc&device=m&keyword=geeksforgeeks&matchtype=e&campaignid=20039445781&adgroup=147845288105&gad_source=1&gclid=Cj0KCQjwk6SwBhDPARIsAJ59GwegeTJbc6aGJqhfid7xlG892rYiAuuvZwkxULIPbtiDTYADMs8E3FEaAqF5EALw_wcB