Solve analytically given differential equations

79 Views Asked by At

So I'm in my Computer Simulations class and my professor gave me 3 different equations to solve.

$$( x + 2x^3)dx + (y + 2y^3)dy = 0 $$ $$ y - xy' = a(1 + x^2y')$$ $$( 1 + e^x)yy' = e^x, y(0) = 1 $$

I will appreciate some directions on how I should approach these equations to solve them :)

The intent is to transform these equations into a form which will be used in an implementation of a solution in a programming language.

I'm reaching out to get some help because the Professor which gave this homework bashes my class with tons of physics, astronomy and game theory and refers back to Algebra and Calculus even though It's last semester of Computer Science with Robotics specialization.

2

There are 2 best solutions below

4
On BEST ANSWER

Last equation is easy to integrate $$( 1 + e^x)yy' = e^x, y(0) = 1 $$ $$\implies \frac 12 (y^2)' = \frac { e^x}{( 1 + e^x)}$$ Just integrate ...

First one is also easy to integrate $$( x + 2x^3)dx + (y + 2y^3)dy = 0$$ $$\frac 12 dx^2 + \frac 12dx^4 + \frac 12dy^2 + \frac 12dy^4 = 0$$ $$ dx^2 + dx^4 + dy^2 + dy^4 = 0$$ $$ x^2 + x^4 + y^2 + y^4 = C$$ You can also integrate directly $$\int ( x + 2x^3)dx + \int (y + 2y^3)dy = K$$


For the second equation you can do this :

$$y - xy' = a(1 + x^2y')$$ $$xy'-y = -a(1 + x^2y')$$ Dibvide by $x^2$ $$(\frac y x)'=-\frac a{x^2}-ay'$$ Integrate directly $$\frac y x=-ay+K-a\int \frac {dx}{x^2}$$ Evaluate the integral $$\frac y x=-ay+K+ \frac {a}{x}$$ $$\implies y(x) =-axy+Kx+a$$ $$ \boxed {y(x) = \frac {Kx+a}{1+ax}}$$

0
On

For the first one, you can rewrite the equation as $$\text{d}f(x)+\text{d}f(y)=0$$ for some univariate polynomial function $f$. For the last one, you can rewrite the differential equation as $$\frac{\text{d}}{\text{d}x}\,g(y)=h(x)$$ for some univariate functions $g$ and $h$. I don't understand your second differential equation.