Example of the Runge – Kutta Method

Posted on Updated on

Example:

Use the 4th order Runge-Kutta method with h = 0.1 to find the

approximate solution for y(1.1), working to 4 decimal places, for the

initial value problem:

dy/dx = 2xy,   y(1) = 1

sol:

We have dy/dx = f(x,y) = 2xy.

If you require the 4th order approximation the formula will be:

y(x0 + h) = y(x0) + (1/6)[w1 + 2w2 + 2w3 + w4]

where:

w1 = h*f(x0.y0)               = 0.1(2)(1)(1)          = 0.2

w2 = h*f(x0 + h/2, y0 + w1/2) = 0.1(2)(1.05)(1.1)     = 0.231

w3 = h*f(x0 + h/2, y0 + w2/2) = 0.1(2)(1.05)(1.1155)  = 0.234255

w4 = h*f(x0 + h,   y0 + w3)   = 0.1(2)(1.1)(1.234255) = 0.2715361

and so:

y(1.1) = 1 + (1/6)[0.2 + 2(0.231) + 2(0.234255) + 0.2715361]

= 1.23367435

We can compare this with the exact solution to the problem.

dy/y  = 2x dx

and integrating:

ln(y) = x^2 + C

and y = 1 when x = 1

0 = 1 + C

and so  C = -1. Therefore:

ln(y) = x^2 – 1

y = e^(x^2-1)

When x = 1.1 this gives:

y = e^(1.1^2 -1)

= e^0.21

= 1.23367806

which is same as Runge-Kutta up to the 5th decimal place.

Edited by- : Dr. Ashwin I Mehta 

 

Advertisements

Java Project

Posted on

I’m grateful to Ashwin Mehta Sir for helping out my son with his java assignments.His patient and kind temperament adds to his profound knowledge of the subject. Thanks a lot Sir !

 

Mechatronics Department

Posted on

Hello Dr. Ashwin Mehta ,

I have asked some of my students to look into the particular topic and shared the details of VISSICOMP TECHNOLOGY. I will be sending you the list of interested students as soon as they confirm.

Thank you for your cooperation and the opportunity.

Nikhil Shrivas

Assistant Professor

Department of Mechatronics Engineering

School of Automobile, Mechanical & Mechatronics Engineering (SAMM)

Manipal University Jaipur

ONE MORE FEATHER IN OUR CAP

Posted on Updated on

Dear Dr. Ashwin Mehta ,

Thanks for your quick  and positive response. I am happy to see your reply. It would be really great thing to connect the Industry-Academia relationship and feel the gap between Industry and Academic. It will be really a very good platform for young minds. In near future, I will send some more students at your organization definitely and would be happy to invite you in our department for some guest lectures and collaborations to grow together.

Thank you once again for your support.

Looking forward for some kind of collaborations and Industry-Academia relationship.

Thanks & Regards,

Prabhat Ranjan

Assistant Professor

Department of Mechatronics Engineering

School of Automobile, Mechanical & Mechatronics Engineering (SAMM)

Manipal University Jaipur

 

 

Python time table

Posted on Updated on

 

                                                                          Mehta Sir
Time
-MON
DAY-
-TUES
DAY-
-WEDNES
DAY-
-THURS
DAY-
-FRI
DAY-
3-4:30pm Hencita,Gaurav-Python & Html Hencita,Gaurav-Python & Html Hencita,Gaurav-Python & Html
4:30-6pm Hencita,Gaurav-Python & Html Hencita,Gaurav-Python & Html

 

 

Triangle

Posted on

11.JPG

  1. What is the area of triangle DEF?

(A)  23

(B)  24

(C)  48

(D)  56

(E)  81

22

  1. If AB and BC have equal lengths, what is the value of x?

33

44

55

Quantity A                                                          Quantity B

  1. a + b + x                                                              c + y + z

66

 

Programs in Python for BFS

Posted on Updated on

Breadth-first search (BFS) is an algorithm used for traversing graph data structures. BFS implements a specific strategy for visiting all the nodes (vertices) of a graph. BFS starts with a node, then it checks the neighbours of the initial node, then the neighbours of the neighbours, and so on.

I’ve created a connected graph with 7 nodes and 8 edges. The edges are undirected and unweighted.  Distance between two nodes will be measured based on the number of edges separating two vertices.   I use the adjacency list to represent the above graph. An effective/elegant method for implementing adjacency lists in Python is using dictionaries. The keys of the dictionary represent nodes, the values have a list of neighbours.

1111

The following screen shot represents representation of the above graph and output shows the result of running Breadth First Search (BFS) algorithm.  Can you explain the output?  Can you write program in Python ?

Send your suggestions and comments to    mehtaashwin@vissicomp.in

Best answer will be rewarded.

22222

Created and edited by Dr. Ashwin I Mehta  at Vissicomp Technology

Please check the schedule or reach at http://www.vissicomp.com/

For more details Call us @9320957718 / 17