Question

In: Computer Science

2. Use MATLAB (ode45) to solve the second-order Euler-Cauchy ODE given in the thick-walled tube elasticity...

2. Use MATLAB (ode45) to solve the second-order Euler-Cauchy ODE given in the thick-walled tube elasticity problem handout for the case:

?r(1) = 0.1, dur(1)/dr = −0.02

Have your MATLAB code print out the values for the constants you determined in the general solution; i.e. “C1 = ... , C2 = ...” make a comparison plot showing your exact solution and the numerical MATLAB result on the same axes.

Solutions

Expert Solution

Here is the solution. Please do upvote thank you.

Code:

clear all

close all

clc

r=[1:0.5:25];

u0=[0.1-0.02];

[r,u]=ode45(@(r,u) Euler_Cauchy(r, u), r, u0) ;

plot(r, u(:, 1))

axis([1,25 min(u(:, 1)) max(u:, 1))])

xlabel('r');

ylabel('u(r)');

Code 2:

function [udot]=Euler_Cauchy(r, u) ;

udot(1)=u(2);

udot(2)=-(u(2).r+2*u(1).r/.^2);

udot=udot'

end


Related Solutions

Show to use ode45 built-in function in MATLAB to solve the following ODE problem: dydx=x^2 /...
Show to use ode45 built-in function in MATLAB to solve the following ODE problem: dydx=x^2 / y y(0)=2   Calculate y(x) for 0 ? x ? 20 and compare the results to analytical solution y = sqrt((2x^3 / 3) + 4)
solve an ODE of whatever expression using ode45 in matlab obtaining the result [t,y]. Evaluate the...
solve an ODE of whatever expression using ode45 in matlab obtaining the result [t,y]. Evaluate the solved ODE in a point. Everything should be done in matlab.
Solve the linear second-order ODE for each case of b. Find constants using the given initial...
Solve the linear second-order ODE for each case of b. Find constants using the given initial conditions. y(0)=1, y'(0)=0 y''+by'+16y=0 b=0 b=2 b=8 b=10 say b represents damping constant. What is the effect of damping on the motion of a mass?
Use the substitution x = et to transform the given Cauchy-Euler equation to a differential equation...
Use the substitution x = et to transform the given Cauchy-Euler equation to a differential equation with constant coefficients. (Use yp for dy/dt and ypp for d2y/dt2.) x2y'' − 3xy' + 13y = 2 + 3x
Use MATLAB DSOLVE to solve the folloing ODE and plot it: 300x'' + 60x' + 6840...
Use MATLAB DSOLVE to solve the folloing ODE and plot it: 300x'' + 60x' + 6840 = f(t)
Use Euler method (as explained on the white board) to solve numerically the following ODE: dy/dt=y+t....
Use Euler method (as explained on the white board) to solve numerically the following ODE: dy/dt=y+t. y(0)=1 You can select the step size. Choose n=3. solve this by hand on a paper and with the aid of Matlab.
Given a second order ode m y’’  + c y’ + k y = 0 with  m, c...
Given a second order ode m y’’  + c y’ + k y = 0 with  m, c and k all positive.  (like a mass‐spring system with damping) Argue that the solution will always be damped; the exponential portion can never be positive regardless of the particular m, c and k.
I need the matlab codes for following question (1) (a). Solve the following second-order differential equations...
I need the matlab codes for following question (1) (a). Solve the following second-order differential equations by a pair of first-order equations, xyʹʹ − yʹ − 8x3y3 = 0; with initial conditions y = 0.5 and yʹ = −0.5 at x = 1. (b). Solve the problem in part (a) above using MATLAB built-in functions ode23 and ode45, within the range of 1 to 4, and compare with the exact solution of y = 1/(1 + x2) [Hint: ode23 à...
solve using both methods (Dsolve and ODE45 on matlab) please provide steps 1) y'+y=e^x 2) y'+2y=...
solve using both methods (Dsolve and ODE45 on matlab) please provide steps 1) y'+y=e^x 2) y'+2y= 2 sin(x)
Given a second order process: 2 AB → A 2 + B 2 with k =...
Given a second order process: 2 AB → A 2 + B 2 with k = 0.0908 M-1min-1; and the initial concentration of AB = 0.941 M, calculate the concentration of A2 after exactly 20 min. Enter the result with 3 sig. figs. exponential notation and no units.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT