Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the Jupyter Notebook, type the Python code for Eulers Method* which has been e-mailed along with this assignment, modifying the code to solve the

In the Jupyter Notebook, type the Python code for Eulers Method* which has been e-mailed along with this

assignment, modifying the code to solve the following IVP:

y ' = t 2 - t2 y , y(0) = 3 , on the interval 0 image text in transcribed t image text in transcribed 5 , with a step size of .25image text in transcribed

In [4] from resources306 import %config InlineBackend, figure-format 'retina ' In [14] tsp. symbols ('t') y sp. Function ('y') yprime sp . Derivative (y (t) ,t) f -ty (t) sol-sp.dsolve ( yprime , y(t).rhs : sol2 sp.dsolve ( yprime- , y(t), icsn(y(1):5)).rhs = display (sol2) def f (t,y) return t - pit. figure (figsize= (8,8) ) pylab inline y5.0 t1.0 T=3 h (T-t) = tlist = [] ylist for i in range (n): tlist.append (t) ylist.append (y) slopetY yy h*slope t=tth tlist.append (t) ylist.append (y) print (list (zip (tlist,ylist))) plt.plot ( tlist, ylist, 'mo, lw-3, alpha-0.5, ) plt.xlabel (t) plt.ylabel (y) plt.grid) In [4] from resources306 import %config InlineBackend, figure-format 'retina ' In [14] tsp. symbols ('t') y sp. Function ('y') yprime sp . Derivative (y (t) ,t) f -ty (t) sol-sp.dsolve ( yprime , y(t).rhs : sol2 sp.dsolve ( yprime- , y(t), icsn(y(1):5)).rhs = display (sol2) def f (t,y) return t - pit. figure (figsize= (8,8) ) pylab inline y5.0 t1.0 T=3 h (T-t) = tlist = [] ylist for i in range (n): tlist.append (t) ylist.append (y) slopetY yy h*slope t=tth tlist.append (t) ylist.append (y) print (list (zip (tlist,ylist))) plt.plot ( tlist, ylist, 'mo, lw-3, alpha-0.5, ) plt.xlabel (t) plt.ylabel (y) plt.grid)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

explain the need for human resource strategies in organisations

Answered: 1 week ago

Question

describe the stages involved in human resource planning

Answered: 1 week ago