Warning: Unable to find explicit solution. in dsolve
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I was wondering if anyone was able to help me with regards to solving a second order differential equation through Matlab.
The equation at hand is from a paper and included below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/559638/image.png)
In this case, r is being varied between inner and outer radius (ri and ro), u is a displacement that I am trying to find, and the rest of the values are known (but are all functions of radius so left as symbols to be substituted further down the line)
Also in the paper is the definition of the boundary conditions below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/559643/image.png)
(rimstress is also known in this case)
I have tried implementing this into matlab to be solved using dsolve as follows:
%Setting symbols
syms u(r) a E h m n o q RS T v
% less obvious symbols: a (alpha), h (rho), o (omega), RS (rimstress)
%2nd Order Differential Equation
eqn = (diff(u,r,2)+diff(u,r)*(((2*m*r+n)/((m*(r^2))+(n*r)))-v/r)+(u*((-v/(r^2))-(1/(r^2))+((v/r)*((2*m*r+n)/((m*(r^2))+(n*r))))))==((a*(1+v)*(q+(T*(-1+((2*m*r+n)/((m*(r^2))+(n*r)))))))-(r*((h*(o^2)*(1-(v^2)))/E))));
%Boundary conditions
du = diff(u,r);
cond = [(v*u(ri)/ri)+(du(ri))-(a*T*(1+v))==0,(v*u(ro)/ro)+(du(ro))-((RS*(1 - v^2))/E)-(a*T*(1+v))==0];
%note slight difference to first BC from paper as there is a slight error
%in formulation in BC
dsolve(eqn,cond);
However, after loading for a short while Matlab returns the following:
Warning: Unable to find explicit solution.
> In dsolve (line 190)
Am I doing anything incorrect? I get this error with and without using the boundary conditions.
Thanks in advance,
George
0 comentarios
Respuestas (1)
Kartik Saxena
el 23 de Feb. de 2024
Hi,
From the code and the error, it seems that you are trying to solve a rather complex second-order differential equation with boundary conditions that are also functions of the variable 'r'. Such equations might not have an explicit analytical solution, which is why MATLAB is giving you a warning that it cannot find an explicit solution.
If an analytical solution is not necessary, consider using numerical methods to solve the differential equation. MATLAB's 'ode45' or other ODE solvers can be used to find a numerical solution. You can rewrite your second order differential equation as a system of first order differential equations and then use 'ode45' to solve it.
Refer to the following MathWorks documentation to know more about 'ode45':
0 comentarios
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!