When a derivative can be written as a function of the independent variable only for example

y'=f(x)

y''=f(x)

y'''(x)=f(x)

etc.

 

We call that a directly integrable equation.

 

Example 1:

 

Find the general solution for the following directly integrable equation

diff(y, x) = 6*x^2+4*y(1) and 6*x^2+4*y(1) = 0

That means

int(6*x^2+4, x)

y = 2*x^3+c+4*x", where" c is an arbitary solution

``

 

 
equation1 := diff(y(x), x) = 6*x^2+4

diff(y(x), x) = 6*x^2+4

(1)

NULL

NULL

sol1 := dsolve(equation1, y(x))

y(x) = 2*x^3+c__1+4*x

(2)

And  if we have the initial condition
y(1) = 0
particular_sol1 := dsolve({equation1, y(1) = 0}, y(x))

y(x) = 2*x^3+4*x-6

(3)

"(->)"

 

 

 

 

 

"Example 2:"NULL

NULL

"  Find the particular solution for the following equation with condition"

 

x^2*(diff(y(x), x)) = -1

y(1)=3

So we will need to get the y' by itself

int(-1/x^2, x)

so,

y = 1/x+c , where c is an arbitary constant

And this is our general solution. Now we plug in the initial condition when x = 1, y = 3.

 

That means c = 2.

 

Thus, the particular solution is

 

y = 1/x+2``

eq := x^2*(diff(y(x), x)) = -1

x^2*(diff(y(x), x)) = -1

(4)

NULL

NULL

sol := dsolve(eq, y(x))

y(x) = 1/x+c__1

(5)

NULL

particular_sol := dsolve({eq, y(1) = 3}, y(x))

y(x) = 1/x+2

(6)

NULL

NULL

plot(1/x+2, x = -20 .. 20, color = "Red", axes = normal, legend = [typeset(1/x+2)])

 

NULL

NULL

NULL

NULL

" Example 3:"

 

" Find the particular solution for the following equation with condition"

 

diff(y, t, t) = cost, (D(y))(0) = 0, y(0) = 1

eq1 := diff(y(t), t, t) = cos(t)

diff(diff(y(t), t), t) = cos(t)

(7)

particular_sol := dsolve({eq1, y(0) = 1, (D(y))(0) = 0}, y(t))

y(t) = -cos(t)+2

(8)

"(->)"

 

 

 

 

NULL


 

Download integral.mw

 


Please Wait...