Question: In my attempt in using MATLAB to solve for the general solution and particular solution when y ( 1 ) = 1 of the question

In my attempt in using MATLAB to solve for the general solution and particular solution when y(1)=1 of the question as shown in the picuture, y'=x2+3xy3x2. The following are my codings:
syms x y; % Define symbolic variables
syms ode;
syms sol;
% Define the ODE
ode =(x^2+3*x*y)/(3*x^2);
% Separate variables using manual method, then input into here
eqn = int(1/(x^2+3*x*y), y)== int(1/(3*x^2), x);
% Solve the equation
sol = dsolve(eqn);
% Display the general solution
disp('General Solution:');
disp(sol);
% Define the initial condition
initial_condition = sol.subs(x,1)==1;
% Solve for the constant of integration
constant = solve(initial_condition);
% Substitute the constant into the general solution to find the particular solution
particular_solution = sol.subs(constant);
% Display the particular solution
disp('Particular Solution:');
disp(particular_solution);
However, it outputs errors as shown below, i don't know where did i do wrong. Please correct and teach me.
Error using mupadengine/feval2sym_NaNsingularity
No differential equations found. Specify differential equations by using symbolic functions.
Error in dsolve>mupadDsolve (line 334)
T = feval2sym_NaNsingularity(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 203)
sol = mupadDsolve(args, options);
Error in ODE_Q1(line 12)
sol = dsolve(eqn);
Related documentation
 In my attempt in using MATLAB to solve for the general

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!