Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Project: elimination
Views: 14
Image: ubuntu2204
Kernel: Octave 8.2
% Define the equation as a function of x and y f = @(x,y) (2*x + y)/(2*y - 2*x^2); % Use ode45 to solve the equation numerically [x,y] = ode45(f, [0, 10], 1); % Plot the solution curve plot(x,y) xlabel('x') ylabel('y') title('Elimination of Arbitrary Constants cy^2=x^2+y')
warning: using the gnuplot graphics toolkit is discouraged The gnuplot graphics toolkit is not actively maintained and has a number of limitations that are unlikely to be fixed. Communication with gnuplot uses a one-directional pipe and limited information is passed back to the Octave interpreter so most changes made interactively in the plot window will not be reflected in the graphics properties managed by Octave. For example, if the plot window is closed with a mouse click, Octave will not be notified and will not update its internal list of open figure windows. The qt toolkit is recommended instead.
Image in a Jupyter notebook
% Define the equation as a function of x and y f = @(x,y) (y - 4)/exp(3*x); % Use ode45 to solve the equation numerically [x,y] = ode45(f, [0, 10], 1); % Plot the solution curve plot(x,y) xlabel('x') ylabel('y') title('Elimination of Arbitrary Constants y=4+c_1e^{3x}')
Image in a Jupyter notebook
% Define the equation as a function of x and y f = @(x,y) (y - 2*y.*cos(6*x))./exp(2*x); % Use ode45 to solve the equation numerically [x,y] = ode45(f, [0, 10], 1); % Plot the solution curve plot(x,y) xlabel('x') ylabel('y') title('Elimination of Arbitrary Constants y=c_1e^{2x} \cos 3x + c_2e^{2x} \sin 3x')
Image in a Jupyter notebook
% Define the equation as a function of x and y f = @(x,y) (y - x^2 - x.*exp(-x))./exp(-x); % Use ode45 to solve the equation numerically [x,y] = ode45(f, [0, 10], 1); % Plot the solution curve plot(x,y) xlabel('x') ylabel('y') title('Elimination of Arbitrary Constants y=x^2 + c_1x +c_2e^{-x}')
warning: Solving was not successful. The iterative integration loop exited at time t = 6.559372 before the endpoint at tend = 10.000000 was reached. This may happen if the stepsize becomes too small. Try to reduce the value of 'InitialStep' and/or 'MaxStep' with the command 'odeset'. warning: called from integrate_adaptive at line 282 column 7 ode45 at line 239 column 12
Image in a Jupyter notebook
% Define the equation as a function of x and y f = @(x,y) (y - 2*x.*y - y.^2)./(x.^2 + x); % Use ode45 to solve the equation numerically [x,y] = ode45(f, [0, 10], 1); % Plot the solution curve plot(x,y) xlabel('x') ylabel('y') title('Elimination of Arbitrary Constants y= ax^2 + bx + c')
error: integrate_adaptive: Solving was not successful. The iterative integration loop exited at time t = 0.000000 before the endpoint at tend = 10.000000 was reached. This happened because the iterative integration loop did not find a valid solution at this time stamp. Try to reduce the value of 'InitialStep' and/or 'MaxStep' with the command 'odeset'.
Image in a Jupyter notebook