Maple Solving Maple Procedure Issues with DE_soln

  • Thread starter Thread starter Warr
  • Start date Start date
  • Tags Tags
    Maple Procedure
AI Thread Summary
The discussion revolves around a problem with a Maple procedure designed to generate a list of solutions from a differential equation. The procedure, defined as "proc1", is intended to replace the constant _C1 in the test function DE_soln with specific values over a specified range. However, when the procedure is executed, it returns the function in its original form, without substituting the values for _C1. This issue contrasts with generating the sequence externally, which successfully replaces _C1 with the desired values. The user has attempted to declare _C1 as a local variable within the procedure, but this did not resolve the issue. The main concern is finding a way to ensure that the procedure correctly substitutes the values for _C1 as intended, as previous attempts have not yielded successful results.
Warr
Messages
119
Reaction score
0
Having a problem with a procedure

the procedure is

> proc1:=proc(f,a,b,xmin,xmax)
> local locallist;
> locallist:=[seq(rhs(f),_C1=a..b)];
> RETURN(locallist);
> end;

the test function I am using for f is

DE_soln = y(x) = (arctan(x)+_C1)/(1+x^2)^2;

Which I got from using the dsolve for a differential equation

When I generated a sequence of this externally (not using the procedure)

with the following command

DE_soln_list := [seq(rhs(DE_soln),_C1=-2..2)];

I got a set of 5 solutions with just had the _C1 replaced by -2,-1,0,1,2 in each respective 'solution'

When I try plugging DE_soln into the procedure, it returns a list of 5 solutions, but all in the form (arctan(x)+_C1)/(1+x^2)^2

_C1 was simply a variable created by dsolve when solving the differential equation.

How do I get the procedure to sub in the numbers for _C1, because it seems that it works differently inside the procedure (I tried to declare _C1 as a local variable inside the procedure but that did nothing)

thanks
 
Physics news on Phys.org
I've honestly tried everything I can think of and looked on ever maple forum. Maybe I'm missing something...
 

Similar threads

Replies
3
Views
3K
Replies
1
Views
2K
Replies
9
Views
5K
Replies
1
Views
3K
Replies
2
Views
3K
Back
Top