how to write to solve this type of system of equations ?

1 次查看(过去 30 天)

回答(2 个)

Wan Ji
Wan Ji 2021-9-12
Hey friend
Just expand the left items of the two equations, extract u'' and v'', then an ode45 solver is there for you.

Walter Roberson
Walter Roberson 2021-9-12
编辑:Walter Roberson 2021-9-12
I was not able to figure out what is being raised to 10/9 . I used squiggle instead.
syms u(r) v(r)
syms N squiggle real
assume(r, 'real')
du = diff(u);
dv = diff(v);
left1 = diff(r^(N-1)*du^3)
left1(r) = 
right1 = r^(N-1) * sqrt(u) * sqrt(v) / (3*r^(2/3) * sqrt(1 + 9*squiggle^(10/9)/(10*(3*N-2)^(1/3))))
right1(r) = 
left2 = diff(r^(N-1)*dv^3)
left2(r) = 
right2 = r^(N-1) * u * v / (3*r^(2/3))
right2(r) = 
eqn1 = left1 == right1
eqn1(r) = 
eqn2 = left2 == right2
eqn2(r) = 
ic = [u(0) == 1, v(0) == 1, du(0) == 0, dv(0) == 0]
ic = 
sol = dsolve([eqn1, eqn2, ic])
Warning: Unable to find symbolic solution.
sol = [ empty sym ]
string(eqn1)
ans = "3*r^(N - 1)*diff(u(r), r)^2*diff(u(r), r, r) + r^(N - 2)*(N - 1)*diff(u(r), r)^3 == (r^(N - 1)*u(r)^(1/2)*v(r)^(1/2))/(3*r^(2/3)*((9*squiggle^(10/9))/(10*(3*N - 2)^(1/3)) + 1)^(1/2))"
string(eqn2)
ans = "3*r^(N - 1)*diff(v(r), r)^2*diff(v(r), r, r) + r^(N - 2)*(N - 1)*diff(v(r), r)^3 == (r^(N - 1)*u(r)*v(r))/(3*r^(2/3))"
string(ic)
ans = 1×4 string array
"u(0) == 1" "v(0) == 1" "subs(diff(u(r), r), r, 0) == 0" "subs(diff(v(r), r), r, 0) == 0"
Lack of a symbolic solution means that you would have to do numeric solutions -- but you cannot do a numeric solution to infinity, and you certainly would not get a formula out of it.
  5 个评论
NIRUPAM SAHOO
NIRUPAM SAHOO 2021-9-12
syms p(t) m(t) t Y
Eqns = [diff((t^(100-1))*(diff(p(t),t))) == (t^(100-1))*(t-1)*exp(t)*p(t)*m(t);
diff((t^(100-1))*(diff(m(t),t))) == (t^(100-1))*(t-1)*exp(t)*p(t)^(1/2)*m(t)^(1/2)]
[DEsys,Subs] = odeToVectorField(Eqns);
DEFcn = matlabFunction(DEsys, 'Vars',{t,Y});
tspan = [0,100];
y0 = [0 0 0 0];
[t,Y] = ode45(DEFcn, tspan, y0);
plot(t,Y)
## i write this but the graph does not shows . please help me

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by