Question

Using euler's forward method solve this integration: dx/dt = -10 * x(t) + 5 x(0) =...

Using euler's forward method solve this integration:

dx/dt = -10 * x(t) + 5

x(0) = 4

The time step is 0.01, and the time interval is from 0 to 20.

Please show all steps and calculations, because this is just an example problem to help me get a better understanding of euler's method.

Homework Answers

Answer #1

Euler's method is a numerical process to find out the solution of a 1st order ordinary differential equation

  

With the initial condition   

Here we have

Numerical Scheme for Euler's method is, we divide the time period to N small parts and then try to interpolate the solution at every small step. i.e.

(Here the step is 0.01)

Here

Now here is a MATLAB code for the given problem

function [ output ] = g(x,t)
output=-10*x+5;


end

EUL.m

clc
clear all
a=0;b=20;
h=0.01 ;
n=(b-a)/h;
n=ceil(n);
x=linspace(a,b,n+1);
ya=4;
eu=zeros(1,n+1);eu(1)=ya;
y=zeros(1,n+1);y(1)=ya;
for i=1:n
eu(i+1)=eu(i)+h*g(x(i),eu(i));
  
end

Thanks

R

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
solve the given initial value problem dx/dt=7x+y x(0)=1 dt/dt=-6x+2y y(0)=0 the solution is x(t)= and y(t)=
solve the given initial value problem dx/dt=7x+y x(0)=1 dt/dt=-6x+2y y(0)=0 the solution is x(t)= and y(t)=
Solve the IVP dx/dt=[8 0, 16 0]x x(0)=[-5 6] x(t)=[ ? , ?]
Solve the IVP dx/dt=[8 0, 16 0]x x(0)=[-5 6] x(t)=[ ? , ?]
Use Euler’s method to numerically solve the differential equation dx/dt=0.3x−10 for 0≤t≤3 given that x=40 when...
Use Euler’s method to numerically solve the differential equation dx/dt=0.3x−10 for 0≤t≤3 given that x=40 when t=0. Do not do any rounding. Work must be shown
Solve the system of equations by method of the Laplace transform: 3 dx/dt + 3x +2y...
Solve the system of equations by method of the Laplace transform: 3 dx/dt + 3x +2y = e^t 4x - 3 dy/dt +3y = 3t x(0)= 1, y(0)= -1
9.(12pts) Solve the following IVP, finding x explicitly as a function of t. dx/dt = 0.1x(10-x)...
9.(12pts) Solve the following IVP, finding x explicitly as a function of t. dx/dt = 0.1x(10-x) , x(0)=2
Using Matlab, solve the following ODE using Euler's method... I have to perform solve the ODE...
Using Matlab, solve the following ODE using Euler's method... I have to perform solve the ODE with both step sizes and plot both on the same graph. y'=1/y, Initial Condition y(0)=1. step size = 0.1 and 0.01 The interval is from 0 to 1. UPDATE: I actually figured it out myself! THANKS
Solve the system of differential equations using laplace transformation dy/dt-x=0,dx/dt+y=1,x(0)=-1,y(0)=1
Solve the system of differential equations using laplace transformation dy/dt-x=0,dx/dt+y=1,x(0)=-1,y(0)=1
Using Euler's method Calculate the exact solution and investigate the accuracy of your approximations. dy/dx=x-xy y(1)=0...
Using Euler's method Calculate the exact solution and investigate the accuracy of your approximations. dy/dx=x-xy y(1)=0 dx=0.2
solve the initial value problems: 1)x'+(1/t)x=1/x, x=2 when t=3. 2)(2tx+x3)dt + (t2+3tx2)dx = 0, x=1 when...
solve the initial value problems: 1)x'+(1/t)x=1/x, x=2 when t=3. 2)(2tx+x3)dt + (t2+3tx2)dx = 0, x=1 when t=1.
1. Use Euler's method Find Y1,Y2, Y3 y'=Y-2X y(1)=0 h=.5 2. Solve dy/dx= (xsinx)/y y(0)=-1
1. Use Euler's method Find Y1,Y2, Y3 y'=Y-2X y(1)=0 h=.5 2. Solve dy/dx= (xsinx)/y y(0)=-1
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT