Symbolic element to equation for differentiation

1 Ansicht (letzte 30 Tage)
Venkatesh Pandian narayanasamy
Kommentiert: Steven Lord am 10 Okt. 2022
Dear all,
I am trying to solve some differential equations in MATLAB and trying to solve them for x and z. But I just get the equations being printed rather than the output being solved.
a = 0.8
syms x z
x = @(x,z)((((1-(a^2))^0.5)*(((x)/(z))+((z)/(x)))*(a-1+((1-((z)/(x)))^2.25)))^-1);
dxz = diff(x,z);
syms x z
ABD = ((x)*(z)/2) + (((x)/4)*(((x)*(x)/(z)) + (z))) - ((1/8)*((((x)*(x)/(z))+ (z))^2)*asin((2*(x)*(z))/(((x)*(x)) + ((z)*(z)))));
pdBDx = diff(ABD,x);
pdBDz = diff(ABD,z);
DiffAABD = (1/2) + ((pdBDx*dxz)+pdBDz)*((1-(a^2))^0.5);
muABD = a*(1/((1-(a^2))^0.5)) * (1/(((x*x/z*z)+1)*z/2))* 0.5;
dybydt = DiffAABD/muABD
I would like to at the end have dybydt(1,1), but when I do it the output is
ans =
(4*z*(x^2 + 1)*((2*x)/5 - (x*(x^2/z^2 - 1))/5 + (4*(((4*x)/(5*z^2) - 4/(5*x))/(((4*x)/(5*z) + (4*z)/(5*x))^2*((1 - z/x)^(9/4) - 2/5)) + (9*(1 - z/x)^(5/4))/(4*x*((4*x)/(5*z) + (4*z)/(5*x))*((1 - z/x)^(9/4) - 2/5)^2))*((3*z)/4 + (3*x^2)/(4*z) - (((2*z)/(x^2 + z^2) - (4*x^2*z)/(x^2 + z^2)^2)*(x^2/z + z)^2)/(8*(1 - (4*x^2*z^2)/(x^2 + z^2)^2)^(1/2)) - (x*asin((2*x*z)/(x^2 + z^2))*(x^2/z + z))/(2*z)))/5 - (((2*x)/(x^2 + z^2) - (4*x*z^2)/(x^2 + z^2)^2)*(x^2/z + z)^2)/(10*(1 - (4*x^2*z^2)/(x^2 + z^2)^2)^(1/2)) + (asin((2*x*z)/(x^2 + z^2))*(x^2/z^2 - 1)*(x^2/z + z))/5 + 1/2))/3
I want them solved for x and z. I had also tried dybydt = @(x,z)DiffAABD/muABD also additing @(x,z) to all the equationsbut doesn't work. Your answers would be really helpful, thanks. :)
  8 Kommentare
Bjorn Gustavsson
Bjorn Gustavsson am 10 Okt. 2022
@Venkatesh Pandian narayanasamy, maybe it will be clearer if you use mathematical notation in your problem-description. The editor has latex-like capabilities (latext-like: most/all stuff I've tried to write have worked)
Steven Lord
Steven Lord am 10 Okt. 2022
The equation for x would ideally be x ...
No, that is your implementation. Please show us the mathematical equation you're trying to solve (equations not code.) You can use the equation editor (the Sigma sign in the Insert section of the toolstrip of the comment box) to enter it, or you could attach an image of the equation if it's from a book or paper.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by