Question

In: Advanced Math

Use numerical integration to calculate the solution of Airy’s differential equation x''=tx from initial conditions x(-14.5)=0...

Use numerical integration to calculate the solution of Airy’s differential equation x''=tx from initial conditions x(-14.5)=0 and x'(-14.5)=1 until t =3.

Then plot the curve. Be sure to sample the curve frequently enough that it appears smooth.

Solutions

Expert Solution


%%Matlab code for system of ODE using Euler's forward
clear all
close all
%Euler forward for question

%functions for Euler equation solution
f1=@(x1,x2,t) x2;
f2=@(x1,x2,t) t.*x1;

% step size
h=0.0001;
%Initial values
x10=0;
x20=1;
t0=-14.5;

%x end values
tend=3;
tn=t0:h:tend;
% Euler steps

x1_result(1)=x10;
x2_result(1)=x20;
t_result(1)=t0;

%solution for Euler forward scheme  
for i=1:length(tn)-1
    t_result(i+1)= t_result(i)+h;
    x1_result(i+1)=x1_result(i)+h*double(f1(x1_result(i),x2_result(i),t_result(i)));
    x2_result(i+1)=x2_result(i)+h*double(f2(x1_result(i),x2_result(i),t_result(i)));
end
  

figure(1)
plot(t_result,x1_result)
title('Solution plot for step size dt=0.0001')
xlabel('t')
ylabel('x(t)')

%-------------------------------------------------------------%


Related Solutions

Solve the differential equation by variation of parameters, subject to the initial conditions y(0) = 1,...
Solve the differential equation by variation of parameters, subject to the initial conditions y(0) = 1, y'(0) = 0. y'' + 2y' − 8y = 4e−3x − e−x
Solve the differential equation by variation of parameters, subject to the initial conditions y(0) = 1,...
Solve the differential equation by variation of parameters, subject to the initial conditions y(0) = 1, y'(0) = 0. 2y'' + y' − y = x + 7
Power series Find the particular solution of the differential equation: (x^2+1)y"+xy'-4y=0 given the boundary conditions x=0,...
Power series Find the particular solution of the differential equation: (x^2+1)y"+xy'-4y=0 given the boundary conditions x=0, y=1 and y'=1. Use only the 7th degree term of the solution. Solve for y at x=2. Write your answer in whole number.
Solve the differential equation y'' − y' − 2y = 9e^2t , with initial conditions y(0)...
Solve the differential equation y'' − y' − 2y = 9e^2t , with initial conditions y(0) = 3, y' (0) = −2, using two different methods. Indicate clearly which methods you are using. First method: Second method:
Find the particular solution of the first-order linear differential equation for x > 0 that satisfies...
Find the particular solution of the first-order linear differential equation for x > 0 that satisfies the initial condition. (Remember to use absolute values where appropriate.) Differential Equation Initial Condition x dy = (x + y + 7) dx y(1) = 6 y =
Solve the differential equation. y''-3y'-4y=5e^4x initial conditions: y(0)=2 y'(0)=4
Solve the differential equation. y''-3y'-4y=5e^4x initial conditions: y(0)=2 y'(0)=4
Is the function g(x) = (x^2)cos(x) A solution to the differential equation (x^2)y''- 2y=0
Is the function g(x) = (x^2)cos(x) A solution to the differential equation (x^2)y''- 2y=0
Use a Laplace Transform technique to find the solution to the differential equation (ie. initial value...
Use a Laplace Transform technique to find the solution to the differential equation (ie. initial value problem). y'' + 4y' + 5y = 35e^(-4t) y(0) = -3 y'(0) = 1
For the wave equation, utt = c2uxx, with the following boundary and initial conditions, u(x, 0)...
For the wave equation, utt = c2uxx, with the following boundary and initial conditions, u(x, 0) = 0 ut(x, 0) = 0.1x(π − x) u(0,t) = u(π,t) = 0 (a) Solve the problem using the separation of variables. (b) Solve the problem using D’Alembert’s solution. Hint: I would suggest doing an odd expansion of ut(x,0) first; the final solution should be exactly like the one in (a).
Determine the solution to the initial value differential equation; y′=0.0015y(1100−y), y(0)=32 1. y(x) = ? 2....
Determine the solution to the initial value differential equation; y′=0.0015y(1100−y), y(0)=32 1. y(x) = ? 2. What is the maximum value of this function. In other words, evaluate: lim x-> inf y(x) 3. Determine x for which y(x) reaches 86% of its maximum value.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT