# Q(1) SOLVE A SIMPLE ODE
# the ODE, dy/dx + y = x, y(0) = 1 can be analytically solved to get
# the equation y(x) = x + 2*exp(-x) - 1.
# Show that you can use ODEINT to match that performance using pyplot
This is in python
`Hey,
Note: If you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
Note: Brother sometimes while uploading on HomeworkLib the indentations change. So, I request you to verify it with screenshot once. This is the link where I have saved the code too
https://trinket.io/python3/8e6278181f
import matplotlib.pyplot as plt
from scipy.integrate import odeint
import numpy as np
def f(x,y):
return x-y;
x = np.linspace(0,2,100);
x0=1
y1=odeint(f, x0, x);
y2=x+2*np.exp(-x)- 1
plt.plot(x,y1);
plt.plot(x,y2);
plt.legend(['ODEINT','Exact']);
plt.show();
Kindly revert for any queries
Thanks.
1. a) Solve the following linear ODE. dy * dx + 2y = 4x2, x > 0 b) Solve the following ODE using the substitution, u = dy (x - y) dx = y c) Solve the Bernoulli's ODE dy 1 + -y = dx = xy2 ; x > 0
We have this simple ODE model subject to x(0) = x0 ≥ 0, y(0) =
y0 ≥ 0 (you may choose values of x0 and y0). The constants α, β
> 0.
Question: Find an ODE for y(t) by eliminating x. Solve this ODE
analytically. Plot solutions using Mathematica.
x — ау dx dt dy dt = Вх y
Q1: Solve the ODE: f) Vyy' + y3/2-1. y(1) = 0. g) (2x +y)dx(2x+y-1)dy 0. i) dx=xy2e": y(2)=0. j) (1 + x*)dy + (1 + y*)dx = 0; y(1) = V3.
Q1: Solve the ODE: f) Vyy' + y3/2-1. y(1) = 0. g) (2x +y)dx(2x+y-1)dy 0. i) dx=xy2e": y(2)=0. j) (1 + x*)dy + (1 + y*)dx = 0; y(1) = V3.
Using integrating factor, solve the initial value problem for the following ODE. dy y dx X - 7xe, y(1) = 7e -7 The solution is y(x) = D.
dy dx 2 points) The phase plot foan ODE shown below dy/dx hoyts dockland - Google Search -1 (a) Which of these could be a plot of solutions y vs x corresponding to this ODE? A. B. C. D. You can click the graphs above to enlarge them. A. A B. B C. C D. D (b) The smallest equilibrium of this ODE is y- and the largest equilibrium of this ODE is y (c) For which of the following...
Solve differential equation. (x/y) (dx/dy) +(ln(y) - x) =0 I have been told it is not solved by substitution. It doesn't look exact or separable. It appears to be linear, but the mixed variable for qx and the natural log is confusing to me.
In the previous lecture this method was explained. Recall that an ODE of the type dy/dr+py be rewritten as may 讐-劘塭 dr with ydl/dx- Ipy from where /(x) can be derived The complete solution of this ODE then is a sum of two terms: a term y. which is a solution of the ODE rewritten as d(ly)/dx- lq and a term y2, which follows from solving the homogeneous equation (the ODE with q-0 Task Solve two differential equations and determine...
Solve the differential equation and use matlab to plot the solution 2. dy +2xy f(x), y(0) = 2 dx f(x)=x0sx<1 l0 x 2 1
Solve the differential equation and use matlab to plot the solution 2. dy +2xy f(x), y(0) = 2 dx f(x)=x0sx
(2x+ 2 x y²) dx + ( x ²) - 3y) dy = 0 solve your equation
solve using Exact and Non-Exact DE
13. -y dx +(x - x) dy 0 dy 0