unable to solve with respect to y

1 Ansicht (letzte 30 Tage)
Juanita Rout
Juanita Rout am 6 Mai 2021
Beantwortet: Star Strider am 6 Mai 2021
Did you mean:
>> ode=(x^2*diff(y,x,2))-(3*x*diff(y,x,1))+(3*y)==(2*x^4(exp^x))
ode=(x^2*diff(y,x,2))-(3*x*diff(y,x,1))+(3*y)==(2*x^4(exp^x))

Antworten (1)

Star Strider
Star Strider am 6 Mai 2021
Try this —
syms s x y(x) y0 Dy0 C1 C2
Dy = diff(y);
D2y = diff(Dy);
ode=(x^2*D2y)-(3*x*Dy)+(3*y)==(2*x^4*(exp(x)))
ode(x) = 
y(x,C1,C2) = dsolve(ode)
y(x, C1, C2) = 
figure
fplot(y(x, 1, 2), [0 1])
I will let you compare your code to my correcctions to understand the reason this version works.
(I believe is and is , however it is not possible to define them directly, for some reason.)

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by