I am trying to solve an differential equation:
DSolve[{0.02*x^2*y''[x] - y'[x] - y[x] == 0}, y[x], x]
But I got warnings:
Part::partw: Part 2 of {1} does not exist.
How do I understand this warning? Many thanks.
I can reproduce this in V7.0.1, but not in V8.0.1, so it looks like a bug that got fixed at some point. The ultimate answers in both versions are the same.
Related
How can I force Mathematica to simplify the derivative of Sign? The following
FullSimplify[D[Sign[x], x], x > 0]
does not work. All it produces is
Sign'[x]
(On the other hand,
FullSimplify[D[Abs[x], x], x > 0]
goes through.)
The Mathematica Sign function can handle complex numbers. This complicates things. If your implementation is only relevant for real numbers, it might be better to use RealSign[] because that is differentiable.
I had a similar issue and found this information in the reference pages:
https://reference.wolfram.com/language/ref/Sign.html
The question seems too easy to answer, however it is not, since I have to deal with functions that do not have closed forms (or I don't know how to find them). For example, I would like to find inverse functions for:
y == x Tan[x]
and
y == a x + b Tan[x].
Thus far, I used Newton-Rhapson's method for the inverse transformations. It works fine, but requires iterations. I just wonder whether there is a method to prove that there is a better solution or not. I've tried Wolfram Mathematica to find a solution, but since I'm a beginner. I have had no luck to get anything meaningful.
Seems it can't be done.
Solve[y == x Tan[x], x]
Solve::nsmet: This system cannot be solved with the methods available to Solve.
InverseFunction[# Tan[#] &]
My question is about an apparent failure of Mathematica's function "FullSimplify" to simplify an easy algebraic expression.
This is the expression that I ask Mathematica to evaluate:
FullSimplify[Re[a^(I*b)] - Re[a^(-I*b)], Element[a, Reals] && a > 0 && Element[b, Reals]]
This should give the result 0. Instead Mathematica only restates my expression:
Re[a^(-I b) (-1 + a^(2 I b))]
Replacing a and b by actual numbers solves the problem.
What could be the cause of it? How to effectively use FullSimplify (and Simplify, Expand, Integrate and so...)?
I read that the order of variables could play a role here, but I couldn't wrap my head around it.
I tried to check for similar problems on the website as well, but I couldn't find any answer that could explain this phenomenon.
Thanks in advance for your support.
I am trying to solve equation
sqrt(x)==sqrt(20*(1500-x))
in sage and getting the output as given bellow,
sqrt(x) == sqrt(-20*x + 30000)
Problem in the above solution is that there is x in both side. How can I solve this kind of question sot that I get proper solution. I have tried the same problem in maxima also and getting same answer.
There are a few options in Sage with solve, and this one seems to help (I assume the answer is okay).
sage: solve(sqrt(x)==sqrt(20*(1500-x)),x,to_poly_solve=True)
[x == (10000/7)]
Im having trouble getting started. I am in a Financial Engineering program, and I am trying to use a book written in 2003 to help me model partial differential equations, the black scholes model, etc.
But in the introductory chapter there is a very basic ODE interest rate problem, and my output is very different from the book.
DSolve[{y'[t] == ry[t], y[0] == P}, y[t], t]
is what I put in. The book has a very neat solution of {{y(t)->P*exp^(rt)}}
What I get is something like (Note, I can't post the output)
{{y(t) -> integral_1_to_t ry(K[1]]dK[1] - integral_1_to_0 ry(K[1])dK[1]+P}}
What are the big K's? Is this just some rule output that can't generate a symbolic solution? Because of some problem with my set up or filesystem? Also, are there any suggestions for using old books on Mathematica where the code provided may be out of date? I just need to find a way to move forward and apply this to my studies.
Last, sometimes with other ODE's I will get results different than my source. I.E. I followed a Mathematica ODE tutorial and my output was different too. In some places my version of Mathematica won't calculate, or drops certain variable s or constants in the solution, or there is no output. I have browsed for general troubleshooting for DSolve, but have found no persistent and recognized bug. I am wondering if there is something wrong in my file system, or something else? Please help!
You've an space missing between the r and the y[t].
Try:
DSolve[{y'[t] == r y[t], y[0] == P}, y[t], t]