Carl Love

Carl Love

28100 Reputation

25 Badges

13 years, 107 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

Please post a more-detailed example. Certainly the information can be extracted from the plot data, if need be. Generally (there are some exceptions), one can extract the data matrix from a plot like this:

plot(...);
P:= %:
M:= op([1,1], P);

Then M is a matrix of two columns, the first being the x values and the second being the y values.

More sophisticated solving techniques may be possible also.

@mehdi jafari

Mehdi,

You correctly indentified the source of the error as the {C=0} in the line

 

Minimize(J,{C=0});

However, your correction

 

Minimize(J,{seq(C[i]=0,i=1..nops(C))});

is not quite correct. You cannot correctly apply nops to a Vector. You need to use numelems instead. nops(C) returns 3, whereas the correct number of elements is 5. This makes a small change in the optimal point.

@acer It doesn't work for me. I get this error message:

Error, (in dsolve/numeric/SC/preproc) unable to compile (rc=1), please try again, and if that fails verify your Windows compiler installation

I am using the default Maple 18 compiler, which seems to work for me in other cases.

Using Maple 18/64 on Windows 8.1/64.

Does the compile option work for you on this ODE system?

@J4James Where did you get that piecewise expression? I don't think that you can use that. As far as I can tell, this sum is not the Fourier series of a piecewise constant function. As far as I can tell, it is the Fourier series of 2*ln((1+sin(2*Pi*x))/(1-sin(2*Pi*x))).

@victormath19 You need to re-execute the code. The execution of the dsolve and the animation command must be in the same "session". When you re-open a worksheet, the results of prior computations are not accessible, even though they may be displayed.

@victormath19 I put my code after yours, and it works fine; although I think it's better without constrained scaling.

@victormath19 You need the set the values of TempsInitial and TempsFinal. Since those names were used in your original code, I assumed that they were already defined. You have to call dsolve also, and equate its output to Trajectoire.

Also, are you mistakenly failing to include the z values in your plot?

@Preben Alsholm I assumed (in my Answer below) that Trajectoire was the output of a dsolve(..., numeric) call.

@J4James If you change k to a float value other than 1, then the integrand becomes complex. In particular, it contains the subexpression (Q-1)^(1/k), a negative number raised to a fractional power.

@Markiyan Hirnyk It is not a trick because I know a priori that h3 is real. It is a mathematical certainty. So I keep applying simplifiers until it looks real.

@J4James

Since you define DP3 as a procedure with parameters Q and tau, why are you using subs to supply the value of tau ???

 

@Markiyan Hirnyk 

If you integrate and plot that simplified expression, you will get exactly the same plot that you got by your technique.

You have not provided any mathematical reasoning as to how h3 could be non-real.

@Markiyan Hirnyk 

Cosine is a real-valued function for real arguments. h3 is a sum of cosine terms times something plus something. How could it possibly not be real, given that the parameters are real?

@ANANDMUNAGALA 

You may be looking for the command DEtools[DEplot].

@lonelyoak 

I have a solution for your problem, but I don't know if you want me to post it. Let me know.

The [] do indeed indicate that there are no solutions for those ranges. I do not understand the 0, but it is not a valid solution. It might have something to do with a default value for piecewise. Note that epsilon=0 is invalid anyway.

First 555 556 557 558 559 560 561 Last Page 557 of 709