General desolve and conditions questions

01242014, 03:56 PM
Post: #1




General desolve and conditions questions
Hello, engineering student here and recently purchased the prime after having a 48G and 50G for a few years. I believe I am a prime candidate for the calculator, being that I am a student. : )
When using desolve I am getting two different results with different variables. 1. desolve(diff(y)+y=5 AND y(0)=3,y returns 2*x^x+5 2. desolve(diff(x)+x=5 AND x(0)=3,x [[]] Any reason why i cannot use syntax 2 for a similar result? Also, is there is anyway I can set a condition when integrating with conditions? for example: 3. f(x)= a/(2^x2  2*b) where b>0 ? I have tried piecewise and the result does not look like it is accounted for? Thank you so much in advance. 

01242014, 04:09 PM
Post: #2




RE: General desolve and conditions questions
diff() takes 2 arguments, but lets you get away with specifying only 1. Usually, you would use diff() as: diff(function, var). If you leave out var, it is presumed to be x, so that diff(y) is really diff(y,x). The same applies for diff(x)  which is interpreted as diff(x,x). That is, the function is "x" and the var is "x", so the derivative is just 1. So in your second case, you are asking desolve() to solve system of equations \( 1+ x = 5 \) and \( x=3 \); there is no solution to such a system.
I am not sure about #3. Graph 3D  QPI  SolveSys 

01242014, 04:27 PM
Post: #3




RE: General desolve and conditions questions
Where is for substitutions, not restrictions.
assume(b>0) then do the calculation. TW Although I work for HP, the views and opinions I post here are my own. 

01242014, 04:31 PM
(This post was last modified: 01242014 04:33 PM by Rich.)
Post: #4




RE: General desolve and conditions questions
Thank you Han, that really clears things up! This is for a dx/dt = x + 5 where x(0) = 3
Would the appropriate formatting be desolve(diff(x+5,[t x]) AND x(0)=3,x) I get bad argument value error now. : ( Thank you Tim for #3! that worked perfectly. //running to class now bbl 

01242014, 05:09 PM
Post: #5




RE: General desolve and conditions questions
I would use the form: desolve( equations, timevar, var ) and even go as far as making the functions explicit (to avoid any ambiguity arising from using shorthand notation). So rather than just x, I recommend x(t)  it will accept just x, though, provided you write diff(x,t) and not diff(x).
desolve( x(t) + diff(x(t),t) = 5 AND x(0) = 3, t, x) Han Graph 3D  QPI  SolveSys 

01242014, 07:22 PM
Post: #6




RE: General desolve and conditions questions
Thank you Han, the additional explanation worked out perfectly. The HP community, as always, is another reason I purchased another HP product!


« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)