Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15203 > unrolled thread

Re: f'[0]=0.5 is True?

Started byDaniel <dosadchy@its.jnj.com>
First post2013-07-20 09:53 +0000
Last post2013-07-20 09:53 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: f'[0]=0.5 is True? Daniel <dosadchy@its.jnj.com> - 2013-07-20 09:53 +0000

#15203 — Re: f'[0]=0.5 is True?

FromDaniel <dosadchy@its.jnj.com>
Date2013-07-20 09:53 +0000
SubjectRe: f'[0]=0.5 is True?
Message-ID<ksdmm5$503$1@smc.vnet.net>
You probably wrote at some point f'[0]=0.5 (instead of f'[0]==0.5) and Clear[f] does not remove this.

Use Remove[f] instead.

Another thing: it is a good idea to use Clear[] and Remove[] before your code, not in the middle.

This code reproduces your problem:

f'[0] = 0.5;(* introduce the error *)
eqn = f''[x] + 2 f'[x] + 30 f[x] == 0;
Clear[f];
Clear[x];
eqn1 = f[0] == 1;
eqn2 = f'[0] == 0.5;
DSolve[{eqn, eqn1, eqn2}, f[x], x]

This code works:

f'[0] = 0.5;(* introduce the error *)
Remove[f];
Clear[x];
eqn = f''[x] + 2 f'[x] + 30 f[x] == 0;
eqn1 = f[0] == 1;
eqn2 = f'[0] == 0.5;
DSolve[{eqn, eqn1, eqn2}, f[x], x]



> Dear All,
> 
> I'm trying a simple exercise:
> 
> eqn = f''[x] + 2 f'[x] + 30 f[x] == 0;
> Clear[f];
> Clear[x];
> eqn1 = f[0] == 1;
> eqn2 = f'[0] == 0.5;
> DSolve[{eqn, eqn1, eqn2}, f[x], x]
> 
> 
> and I get:
> DSolve::deqn: Equation or list of equations expected
> instead of True in the first argument {30 f[x]+2
> (f^\[Prime])[x]+(f^\[Prime]\[Prime])[x]==0,f[0]==1,Tru
> e}. >>
> 
> so f'[0]=0.5 is True for Mathematica?
> 
> How can it be?
> 
> If I remove eqn2 from DSolve then I get a solution
> with a parameter of course.
> 
> Cheers,
> 
>    Mariusz
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web