Question: Drawing a line element field using a procedure

Well , honestly I can't make sense of how to do this.

Interactive can be done step by step , but now generalize via a procedure , but can't get a handle on it
How to get the right procedure ?

"maple.ini in users"

(1)

NULL

> 

" restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ;"

"maple.ini in users"

 

3

(2)
> 

DV := y(x)*(diff(y(x), x)) = exp(x)

y(x)*(diff(y(x), x)) = exp(x)

(3)
> 

opl_1 := dsolve({DV, RV1}, y(x))

y(x) = (1-2*exp(1)+2*exp(x))^(1/2)

(4)
> 

opl_2 := dsolve({DV, RV2}, y(x))

y(x) = -(1-2*exp(1)+2*exp(x))^(1/2)

(5)
> 

opl := plot({rhs(opl_1), rhs(opl_2)}, x = 0 .. 5, y = -10 .. 10, thickness = 3)

> 

lijnelement := dfieldplot(DV, y(x), x = 0 .. 5, y = -10 .. 10, title = "lijnelementveld met intergaalkromme door (1,1)(1,-1)")

> 

display({opl, lijnelement})

 
> 

NULL

> 

" restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ;"

"maple.ini in users"

 

3

(6)
> 

NULL

> 

DV, RV1, RV2

y(x)*(diff(y(x), x)) = exp(x), y(1) = 1, y(1) = -1

(7)
> 

``

> 

> 

NULL

> 

NULL

> 

"restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ; "

"maple.ini in users"

 

3

(8)
> 

DVplot:=proc(DVA,RV1A,RV2A)
          local DV;RV1;RV2;opl_1;opl_2;opl;lijnelement;
          DV:
          RV1:
          RV2:
          opl_1 := dsolve({DV, RV1}, y(x)):
          opl_2 := dsolve({DV, RV2}, y(x)):
          opl:= plot({rhs(opl_1), rhs(opl_2)}, x = 0 .. 5, y = -10 .. 10, thickness = 3):
          lijnelement:=dfieldplot(DV, y(x), x = 0 .. 5, y = -10 .. 10, title = "lijnelementveld met                intergaalkromme door (1,1)(1,-1)"):
          display({opl, lijnelement});
end proc:

> 

NULL

> 

DVA := y(x)*(diff(y(x), x)) = exp(x)

y(x)*(diff(y(x), x)) = exp(x)

(9)
> 

RV1A := y(1) = 1

y(1) = 1

(10)
> 

RV2A := y(1) = -1

y(1) = -1

(11)
> 

DVplot(DVA, RV1A, RV2A)

Error, (in dsolve) not a system with respect to the unknowns [y(x)]

 
 

NULL

Download DV_plotten-_procedure.mw

Please Wait...