Clear Filters
Clear Filters

Differential Equation Ayers Chapter 2 problem 4

1 view (last 30 days)
Here is my code:
% Verify that (y-C)^2=Cx is the primitive
eq_primitive=(y-C)^2==C*x;
% Substitute the general solution into the primitive equation
sol_y1=sol(1);
sol_y2=sol(2);
disp("Verifying the primitive for the first solution:");
simplify(subs(eq_primitive,y,sol_y1))
disp("Verifying the primitive for the second solution:");
simplify(subs(eq_primitive,y,sol_y2))
% C=xvC=0 output is really C == x|C == 0, I do not know what this means
% perhaps element wise 'or'
% Find the equations of the integral curves through the points x=1 y=2
x_val=1;
y_val=2;
C1=solve(subs((y-C)^2,{x,y},{x_val,y_val})==C*x_val,C);
disp("Values of C");
disp(C1);
% Integral Curves Equations
disp("Integral curves equations:");
for i=1:length(C1)
eq_curve=(y-C1(i))^2==C1(i)*x;
disp(eq_curve);
end
Here is my output
diff(y(x), x)
General Solution:
[sym(0); sym(1/2) + x/4]
Verifying the primitive for the first solution:
C == x|C == 0
Verifying the primitive for the second solution:
(2 - 4*C + x)^2 == 16*C*x
Values of C
[sym(1); sym(4)]
Integral curves equations:
(y(x) - 1)^2 == x
(y(x) - 4)^2 == 4*x
  2 Comments
Joseph Palumbo
Joseph Palumbo on 22 May 2024
How do I solve the general solution, prove the primitive
Joseph Palumbo
Joseph Palumbo on 22 May 2024
The problem was from Ayers Differential equations Schaums Outline Chap. 2 problem 4
Show that (y-C)^2=Cx is the primitive of the differential equation 4x*(dx/dy)^2 + 2xdy/dx – y=0
And find the equations of the integral curves through the point (x=1 y=2)
Here 2(y-C)dy/dx = C and dy/dx=C/(2(y-C)
Then 4xC^2/4(y-C)^2 + 2xC/(2(y-C)) – y = C^2x+Cx(y-C)-y(y-C)^2/(y-C)^2= y(Cx-(y-C)^2)/(y-C)62=0
When x=1,y=2 : (2-C)^2=C and C=1,4
The equations of the integral curves through (x=1,y=2) are (y-1)^2=x and (y-4)^2=4x
Graciously helped me with the last parts of it, but the general solution I cannot get the same thing as he does and proving the primitive I do not get the same as he does, he used R2024(A) I’m using R2022(b),
But I do not understand the answers he gets, I showed the code and the output I get.
I want to thank everybody for even reading this and trying to help---- Joseph Palumbo

Sign in to comment.

Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!