How do I solve this differential equation with MATLAB?

2 Ansichten (letzte 30 Tage)
Patrick Smith
Patrick Smith am 3 Okt. 2019
Kommentiert: Patrick Smith am 3 Okt. 2019
Hi yall!
I'm wondering how to get the solution for "dy/dx = x^2 - 1" in MATLAB using dsolve with initial condition y(0) = 1. I want to know and see all the MATLAB work for when x = 1 and when x = 2. I'm familiar with dsolve but I want to see how to use it correctly. Please help me.

Antworten (1)

Walter Roberson
Walter Roberson am 3 Okt. 2019
Bearbeitet: Walter Roberson am 3 Okt. 2019
syms y(x)
dy = diff(y(x),x);
eqn = dy == Some Function Of x and y
sol = dsolve(eqn, y(0) == Initial Condition)
subs(sol, x, Some Value)

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by