1 / 28

Chapter 13: Solving Equations

Chapter 13: Solving Equations. MATLAB for Scientist and Engineers Using Symbolic Toolbox. You are going to. See that MuPAD solves algebraic equations and differential equations Plot the solution curve of the differential equations

Download Presentation

Chapter 13: Solving Equations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 13:Solving Equations MATLAB for Scientist and Engineers Using Symbolic Toolbox

  2. You are going to • See that MuPAD solves algebraic equations and differential equations • Plot the solution curve of the differential equations • Experience some chaotic systems described by a set of nonlinear differential equations.

  3. Polynomial Equations • solvedoes it all Solution Target =0 is the default Not a simple closed form solution Numerical values

  4. Set of Linear Equations • Under-determined equations • Verifying the solutions evalAt operator

  5. Set of Nonlinear Equations

  6. Solving with Assumptions • Give some constraints on solutions

  7. Exercise 1 • Compute the general solution of the system of linear equations How many free parameters does the solution have?

  8. Infinite Number of Solutions • General Solutions • No Symbolic Solution? Try Numerical Solution.

  9. Inequalities • Some Region is the Solution • Checking the Region

  10. Differential Equations • ode and solve • 1st Order • 2nd Order

  11. ODE with Initial Conditions • Initial Conditions with different Initial Values

  12. Exercise 2 • Solve the following ODE for different values of a=-2, 0,+2 and plot the solutions.

  13. Set of Differential Equations

  14. Numerical ODE Solver • Original ODE Matrix Form • Matrix form ODE function • Numeric solution at t=1 initial value time duration

  15. Plotting Numerical ODE Solution • plot::Ode2d • with Mapping function

  16. Ode3d with 3D Mapping • plot::Ode3d

  17. Chaotic System • Lorenz attractor Plot Generator Parameters of Lorenz attractor Initial Condition

  18. Ode2d - Plot • Lorenz attractor (cont.) Initial points are nearly the same.

  19. Ode3d • Lorenz attractor (cont.)

  20. Numerical Solution at a Point • Lorenz attractor (cont.) Chaotic System

  21. Exercise 3 • Compute the general solution y(x)of the differential equationy′ = y2/x . • Determine the solution y(x) for each of the following initial value problems:

  22. Exercise 4 • Draw the 3-D trajectory of the solution of the following system of ordinary differential equations in x(t), y(t), z(t)assuming the initial conditions of x(0)=1, y(0)=0.1, z(0)=-1.

  23. Difference Equations • Arithmetic Sequence

  24. Difference Equation - Geometric

  25. Difference Equations • General Solution • With Initial Conditions

  26. Exercise 5 • The Fibonacci numbers are defined by the recurrence Fn = Fn−1 + Fn−2 with the initial values F0 = 0, F1 = 1. Use solve to find an explicit representation for Fn.

  27. Key Takeaways • Now, you are able to • solve a set of linear and non-linear algebraic equations, • solve a set of ordinary differential equations, • solve a set of nonlinear differential equations numerically and plot them in 2D as well as in 3D space • and to solve difference equations.

  28. Notes solve(x^2+x=y/4,x) solve({x+y+z=3,x+y=2,x-y-z=1},{x,y,z}) solve(sin(x)=1/2) solve( x^2 < 1, x ) plot::Curve2d(..) solve(ode(y''(t)=-3*y'(t)-2*y(t)+2*t^2, y(t))) plot::Ode2d(..) numeric::odesolve(f, 0..1,Y0) ode({y'(x)=y(x),y(0)=1}, y(x)) plot::Ode3d(..) eqn := rec(y(n+2)=y(n+1)+2*y(n), y(n))

More Related