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


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

Re: Simple DSolve equation

Started byDrMajorBob <btreat1@austin.rr.com>
First post2011-11-04 11:05 +0000
Last post2011-11-04 11:05 +0000
Articles 1 — 1 participant

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

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Simple DSolve equation DrMajorBob <btreat1@austin.rr.com> - 2011-11-04 11:05 +0000

#6170 — Re: Simple DSolve equation

FromDrMajorBob <btreat1@austin.rr.com>
Date2011-11-04 11:05 +0000
SubjectRe: Simple DSolve equation
Message-ID<j90guf$slb$1@smc.vnet.net>
a) The solution given is correct, and

b) You gave no restrictions on k. Nor did you ask for any, in Mathematica.

Here's a possible way to go about it:

Clear[y, k, m]
y =
  y /. First@DSolve[{y''[x] == k y[x], y[0] == 0, y'[0] == m}, y, x]

Function[{x}, (E^(-Sqrt[k] x) (-1 + E^(2 Sqrt[k] x)) m)/(2 Sqrt[k])]

s1 = Quiet@Solve[y[10] == 0, {m, k}]
y[10] /. s1
Length@%

{{k -> -\[Pi]^2}, {k -> -((81 \[Pi]^2)/100)}, {k -> -((16 \[Pi]^2)/
     25)}, {k -> -((49 \[Pi]^2)/100)}, {k -> -((9 \[Pi]^2)/
     25)}, {k -> -(\[Pi]^2/4)}, {k -> -((4 \[Pi]^2)/25)}, {k -> -((
     9 \[Pi]^2)/100)}, {k -> -(\[Pi]^2/25)}, {k -> -(\[Pi]^2/
     100)}, {k -> Log[-(-1)^(1/10)]^2}, {k ->
    Log[-(-1)^(1/5)]^2}, {k -> Log[-(-1)^(3/10)]^2}, {k ->
    Log[-(-1)^(2/5)]^2}, {k -> Log[-(-1)^(3/5)]^2}, {k ->
    Log[-(-1)^(7/10)]^2}, {k -> Log[-(-1)^(4/5)]^2}, {k ->
    Log[-(-1)^(9/10)]^2}, {m -> 0}}

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

19

This indicates 18 k values that work for any m, and one m value that works  
for any k.

The suppressed error message (remove Quiet) indicates OTHER solutions may  
exist, but I think not.

Bobby

On Thu, 03 Nov 2011 03:46:30 -0500, Rui <rui.rojo@gmail.com> wrote:

> Why does something like this not give the correct answer with  
> restrictions over k?
> How would you go about getting the right general solutions in these kind  
> of basic differential equations?
>
> Thanks
>
> DSolve[{y''[x] == k y[x], y[0] == 0, y[10] == 0}, y[x], x]
> Out={{y[x] -> 0}}
>


-- 
DrMajorBob@yahoo.com

[toc] | [standalone]


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


csiph-web