Question: t , x = var ( ' t , x ' ) #declaring variables f ( t , x ) = ( x + t

t,x=var('t,x') #declaring variables
f(t,x)=(x+t)/(x^2+t^2)
p1=plot_slope_field(f,(t,-1,5),(x,-5,10), headaxislength=3, headlength=3, axes_labels=['$t$','$x(t)$'],fontsize=12)
p2=desolve_rk4(f,x,ics=[0,1],ivart=t,output='plot',end_points=[-1,5],thickness=2)
p3=desolve_rk4(f,x,ics=[0,3],ivart=t,output='plot',end_points=[-1,5],thickness=2, color='red')
(p1+p2+p3).show(xmin=-1,xmax=5,ymin=-5,ymax=10) This is my code I don't know where I went wrong for part A . QUESTION Plotting Direction Fields: Plot the direction field and the solution curve(s) for each of the
following initial conditions in a single axes using SAGE.
(a)dxdt=x+tx2+t2,x(0)=1,x(0)=3
(b)dydt=2y(1-y4),y(0)=1,y(0)=4
 t,x=var('t,x') #declaring variables f(t,x)=(x+t)/(x^2+t^2) p1=plot_slope_field(f,(t,-1,5),(x,-5,10), headaxislength=3, headlength=3, axes_labels=['$t$','$x(t)$'],fontsize=12) p2=desolve_rk4(f,x,ics=[0,1],ivart=t,output='plot',end_points=[-1,5],thickness=2) p3=desolve_rk4(f,x,ics=[0,3],ivart=t,output='plot',end_points=[-1,5],thickness=2, color='red')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!